home *** CD-ROM | disk | FTP | other *** search
/ Packard Bell - Internet on a CD / internet on a cd.cdr / Internet / sites / Clementine_NASA / climdisp.txt < prev    next >
Encoding:
Text File  |  1998-07-16  |  201.3 KB  |  2,610 lines

  1. PDS_VERSION_ID              = PDS3                                            
  2. RECORD_TYPE                 = FIXED_LENGTH                                    
  3. RECORD_BYTES                = 80                                              
  4. OBJECT                      = TEXT                                            
  5.    INTERCHANGE_FORMAT       = ASCII                                           
  6.    PUBLICATION_DATE         = 1994-09-16                                      
  7.    NOTE                     = "CLIMDISP USER'S GUIDE"                         
  8. END_OBJECT                  = TEXT                                            
  9. END                                                                           
  10.                                                                               
  11.                          CLIMDISP  V1.0                                       
  12.                                                                               
  13. CLIMDISP V1.0 is based on the IMDISP program, version 7.9g.  The              
  14. modifications made are transparent to the user, therefore the                 
  15. IMDISP user's guide is suitable for CLIMDISP users.  There have               
  16. been no changes to the IMDISP user's guide, which is included below.          
  17. However, the user should be aware of the following:                           
  18.                                                                               
  19. 1.  This user guide and the executable and help files have                    
  20.     been renamed from IMDISP.DOC, IMDISP.EXE, IMDISP.HLP to                   
  21.     CLIMDISP.TXT, CLIMDISP.EXE, CLIMDISP.HLP respectively.                    
  22.     Therefore, the program is invoked by typing "CLIMDISP"                    
  23.     or "CLIMDISP <filename>".                                                 
  24.                                                                               
  25. 2.  There have been no changes to the existing IMDISP environment             
  26.     variables (IMDISP, IMBROWSE, IMPALETTE, IMREFRESH, IMHELP),               
  27.     they remain as defined in the user guide.                                 
  28.                                                                               
  29. CLIMDISP was created by the Planetary Data System (PDS) to                    
  30. specifically provide support for the Clementine Mission EDR                   
  31. Image Data Products.  CLIMDISP is maintained by the PDS.  PDS                 
  32. can be contacted by sending electronic mail to JPLPDS::PDS_OPERATOR           
  33. (NSI/DECNET) or calling the PDS Operator at (818)306-6130.                    
  34.                                                                               
  35.      Note: CLIMDISP currently can not create GIF formatted files for          
  36. the Clementine images.  Additionally, it can not read the version             
  37. of GIF files created by the Clementine Decompression (CLEMDCMP)               
  38. program which is also included on the Clementine EDR Archive                  
  39. CD-ROMs. If you wish to display Clementine images with CLIMDISP,              
  40. generate a PDS format image file when decompressing with CLEMDCMP.            
  41.                                                                               
  42. ======================================================================        
  43.                                                                               
  44.                                                                               
  45.                   USER'S GUIDE FOR THE PDS IMDISP PROGRAM                     
  46.                                                                               
  47.                                                                               
  48.                                  Chapter 1                                    
  49.                                                                               
  50.                                 INTRODUCTION                                  
  51.                                                                               
  52.                                                                               
  53.      This document describes version 7.9g of the IMDISP program, an           
  54. interactive image processing utility for the IBM Personal Computer family     
  55. (PC, XT and AT) and compatibles.  It has been developed for use with the      
  56. Compact Disk - Read-Only Memory (CD-ROM) storage systems currently being      
  57. evaluated by the Planetary Data System (PDS).  It can also be used to         
  58. display and process images stored on floppy or hard disks.                    
  59.                                                                               
  60.      This User's Guide presents an overview of image processing and CD-ROM    
  61. fundamentals, a section on the installation of IMDISP and CD-ROM software     
  62. and hardware, a description of IMDISP program operation, a description of     
  63. other utility programs which can be used in conjunction with IMDISP, and a    
  64. command summary.                                                              
  65.                                                                               
  66.      Other support software for using the PDS CD-ROM disks has also been      
  67. developed.  These packages include the USGS Planetary Image Cartography       
  68. System (PICS) for MicroVAX computers, a set of FORTRAN routines to access     
  69. CD-ROM disks on VAX computers (VMSCD), and "C" language source code to        
  70. process disks written in the High Sierra format.  Contact Mike Martin         
  71. (mmartin@jplpds.jpl.nasa.gov) for access to these tools.                      
  72.                                                                               
  73.                                                                               
  74.                                  Chapter 2                                    
  75.                                                                               
  76.                                  BACKGROUND                                   
  77.                                                                               
  78.                                                                               
  79.      Efforts to utilize small computer systems for display and analysis of    
  80. scientific data have been hampered by the lack of sufficient data storage     
  81. capacity to accommodate large image arrays.  Most planetary images require    
  82. nearly a megabyte of storage.  Over the past two years a new storage          
  83. technology, "CD-ROM", has been developed which provides the capability to     
  84. store up to 600 megabytes of data on a single 4.72-inch disk.  The disks      
  85. can be mass produced, and hundreds of copies of large digital archives        
  86. distributed rather than the few sets currently produced.  Readers for         
  87. CD-ROM disks can now be purchased for under a thousand dollars for use on     
  88. personal computers and some science workstations.                             
  89.                                                                               
  90.    The PDS has worked with industry and other government agencies to          
  91. support the development of CD-ROM as a major data distribution and storage    
  92. media for space science data.  Initial development efforts by the PDS, the    
  93. Voyager Project, and multi-disciplinary science representatives have          
  94. resulted in the production of 12 CD-ROM disks containing about 30,000         
  95. images from the Voyager 1 and 2 encounters.  The IMDISP program can be used   
  96. to display most of these data files on a personal computer equipped with a    
  97. CD-ROM drive.                                                                 
  98.                                                                               
  99.    Any feedback on the use of IMDISP is greatly appreciated, and any of the   
  100. following people can be contacted for reporting bugs, adding enhancements,    
  101. etc:                                                                          
  102.                                                                               
  103.       Mike Martin                                                             
  104.       Jet Propulsion Lab                                                      
  105.       Internet: mmartin@jplpds.jpl.nasa.gov                                   
  106.       SPAN: JPLPDS::MMARTIN                                                   
  107.                                                                               
  108.       Ron Baalke                                                              
  109.       Jet Propulsion Lab                                                      
  110.       Internet: baalke@kelvin.jpl.nasa.gov                                    
  111.                                                                               
  112.       Archie Warnock                                                          
  113.       Goddard Space Flight Center                                             
  114.       SPAN:     NDADSA::WARNOCK                                               
  115.                 NSSDC::WARNOCK                                                
  116.       Internet: warnock@hypatia.gsfc.nasa.gov                                 
  117.                 warnock@nssdc.gsfc.nasa.gov                                   
  118.                                                                               
  119.                                                                               
  120. 2.1 DIGITAL IMAGE PROCESSING SUMMARY                                          
  121.                                                                               
  122.                                                                               
  123.    A digital image is a picture converted to numerical form so that it can    
  124. be stored and used in a computer.  The image is divided into a matrix of      
  125. small regions called picture elements, or pixels.  The rows and columns of    
  126. pixels are called "lines" and "samples", respectively.  Each pixel has a      
  127. numerical value, or DN (data number) value, quantifying the darkness or       
  128. brightness of the image at that spot.  In total, each pixel has an address    
  129. (line number, sample number) and a DN value, which is all that the computer   
  130. needs for processing.  The DN value of each pixel usually represents a        
  131. shade of darkness or brightness between black and white (gray levels).  How   
  132. many gray levels there are in an image depends on the number of bits used     
  133. to represent each pixel intensity in the computer.  The number of gray        
  134. levels will be equal to 2^n, where n is the number of bits per pixel's DN     
  135. value.  If 8 bits are used to represent a pixel's DN value (gray level),      
  136. the system will be capable of using 2^8, or 256, gray levels in an image,     
  137. where DN 0 is pure black, and DN 255 is pure white.  If each DN used only 4   
  138. bits of storage, the image would contain only 2^4 or 16 gray levels; if       
  139. there were only 1 bit per DN, the image would contain only black and white    
  140. pixels (bit values of 0 or 1).                                                
  141.                                                                               
  142.                                                                               
  143. 2.2 OVERVIEW OF IMDISP CAPABILITIES                                           
  144.                                                                               
  145.                                                                               
  146.    While the specifics of IMDISP commands are discussed in Chapter 4, this    
  147. section provides a general overview of how a user can manipulate images       
  148. once a file is selected.  There are DISPLAY commands which allow the user     
  149. to display all or part of an image at various positions on the display        
  150. screen.  The user may also zoom in and out from a point on the image          
  151. defined by the cursor, and may pan around the image.  The cursor may be       
  152. turned on or off; when on, the arrow keys are used to move the cursor         
  153. around the screen; when off, the cursor is not visible.                       
  154.                                                                               
  155.    A user may choose to "subsample" the image, to enable more or all of the   
  156. original image to be displayed on the screen at once.  For example, if the    
  157. image were subsampled by a factor of 2, every other pixel from every other    
  158. line would be displayed, starting from the upper left corner of the image.    
  159. If a factor of 3 were chosen, every third pixel from every third line would   
  160. be displayed.  Any positive integer may be used for subsampling.              
  161.                                                                               
  162.    The user may produce a histogram of an image file, which is a graph        
  163. showing the number of pixels per DN value, or per range of DN values, for     
  164. the entire image.  Histograms are overlaid on top of the image, but may be    
  165. removed using the REFRESH command.  Subsampling may be specified when         
  166. computing a histogram to reduce the time required for the calculations.       
  167.                                                                               
  168.    A profile may be created which plots DN value versus pixel along a line    
  169. between two points on the image.  After the cursor is used to select the      
  170. two endpoints, the connecting line is drawn on the image and the profile is   
  171. plotted at the bottom of the screen.  There is a plot command to plot the     
  172. actual data values in an image line.                                          
  173.                                                                               
  174.    The user may also "stretch" the image, which is analogous to turning the   
  175. contrast knob on a TV set.  The user specifies low and high DN values; all    
  176. pixels with values lower than the specified "low" become black, and all       
  177. pixels higher than the specified "high" value become white.  All pixels       
  178. between the low and high values are evenly shaded between black and white.    
  179. IMDISP also has several filter functions available.  The user may process     
  180. the image with a convolution filter, mean or median filters.  There is also   
  181. an edge detection filter, as well as functions to brighten, darken and        
  182. smear the displayed image.                                                    
  183.                                                                               
  184.    There are bookkeeping types of commands, also.  These allow the user to    
  185. do such things as retrieve a desired image from the CD-ROM, to save an        
  186. image to a file on hard disk, and to erase only the graphics from the         
  187. screen or to erase the entire screen.  Users may execute batch command        
  188. files to do a series of tasks automatically.  Lastly, the user may, of        
  189. course, EXIT the IMDISP program when done.                                    
  190.                                                                               
  191.                                                                               
  192. 2.3 GRAY LEVEL AND FALSE COLOR IMAGES                                         
  193.                                                                               
  194.                                                                               
  195.    Most planetary images are composed of 8-bit DN values representing         
  196. monochrome brightness levels in the scene.  To obtain color images,           
  197. separate images are taken through color filters (red, green, blue) and are    
  198. then combined by ground processing systems to produce a true color image.     
  199. Only a very small fraction of planetary images are available in color         
  200. versions.  Most display and analysis is done on monochrome images.            
  201.                                                                               
  202.    A display with 256 (2^8) gray levels is required to present the            
  203. information contained in a standard image.  However, the human eye can only   
  204. distinguish about 32 gray levels.  Thus 5-bit DN values would satisfy most    
  205. display requirements.  Unfortunately, computers are oriented to the storage   
  206. of and manipulation of items which are a power of two, and 5-bit pixels       
  207. would be very clumsy.  The standard display devices which the IMDISP          
  208. program supports are limited to 16 gray levels (PGA and VGA), 4 gray levels   
  209. (EGA) or 2 gray levels (CGA), but the program also supports several           
  210. "enhanced" VGA display devices offering up to 256 colors (or 64 shades of     
  211. gray).  The 16 gray levels of the PGA are adequate to support image           
  212. analysis; however 4 or 2 gray levels are practically useless for viewing      
  213. planetary images.  Fortunately the EGA display will support 16 different      
  214. colors, and a color palette can be selected which uses a graduated scale of   
  215. colors to represent gray levels, producing a "false color" image (false       
  216. because the displayed color does not represent the actual color of the        
  217. scene).                                                                       
  218.                                                                               
  219.    A false color image (also called a pseudo color image) is created from a   
  220. black and white image by assigning a color (rather than a gray level) to      
  221. each DN value in the image.  For instance, a DN value of 128 could be         
  222. reassigned to yellow if the user so desired.  Ranges of DNs (e.g., 100-125)   
  223. may also be assigned one color.  Pseudo colors get assigned to DN values in   
  224. a pseudo color table, which the display program then uses to determine how    
  225. to color the image on the monitor.  Display programs often have preset        
  226. pseudo color tables with commonly used DN-color combinations, and the user    
  227. can simply call for one of these when generating a pseudo color image.  The   
  228. option exists, of course, for users to generate their own pseudo color        
  229. tables.  Pseudo colors are often used to highlight features of an unusual     
  230. nature in an image.                                                           
  231.                                                                               
  232.    Since the Enhanced Graphic Adapter for the IBM PC provides only 4 gray     
  233. shades (black, dark gray, light gray and white) most image viewing is done    
  234. using a pseudo color table which interprets gray levels as color values       
  235. ranging from black through reds, greens and blues up to white.                
  236.                                                                               
  237.                                                                               
  238. 2.4 RADIOMETRIC AND GEOMETRIC CORRECTIONS                                     
  239.                                                                               
  240.                                                                               
  241.    All camera systems have some kind of distortions in the lens, in the way   
  242. the shutter works, etc.  Distortions in the amount of light transferred       
  243. through the camera to the imaging plate are called radiometric distortions.   
  244. Geometric distortion affects the "squareness" of an image, and is detected    
  245. by taking an image of a geometric grid.                                       
  246.                                                                               
  247.    For spacecraft cameras, both types of distortion can be measured before    
  248. launch, and in a limited fashion, in flight.  These measured distortions      
  249. are saved in digital files.  When a raw image is received, these              
  250. "calibration files," as they are called, are subtracted from (or otherwise    
  251. applied to) the image, effectively removing radiometric and geometric         
  252. distortion.  This process is called radiometric and geometric correction.     
  253. Corrected images contain the closest possible representation of the scene     
  254. being imaged.                                                                 
  255.                                                                               
  256.                                                                               
  257. 2.5 IMAGE FILE FORMATS                                                        
  258.                                                                               
  259.                                                                               
  260.    Digital image files are seldom stored as a simple array of pixels.         
  261. Generally there is an area at the beginning of an image file containing       
  262. descriptive information about the image.  This is referred to as a label or   
  263. header area.  Figure 2-1 shows a diagram of a simple image format with a      
  264. label area followed by the image lines.  In practice, images from planetary   
  265. missions have a more complicated format, due to the need to store             
  266. additional information to allow proper interpretation of the image data.      
  267. Figure 2-2 shows the format of a Voyager image, which has engineering         
  268. parameters embedded at the end of each image line to form a line suffix       
  269. area, an engineering trailer record after the last image line, and this is    
  270. followed by an image histogram.                                               
  271.                                                                               
  272.                                                                               
  273.                        |------------------------|                             
  274.                        | Labels or Header Area  |                             
  275.                        |------------------------|                             
  276.                        | Image Array Line 1     |                             
  277.                        |------------------------|                             
  278.                        | Image Array Line 2     |                             
  279.                        |------------------------|                             
  280.                                    .                                          
  281.                                    .                                          
  282.                                    .                                          
  283.                        |------------------------|                             
  284.                        | Image Array Line n     |                             
  285.                        |------------------------|                             
  286.                                                                               
  287.                     Figure 2-1: Simple Image Format                           
  288.                                                                               
  289.    Different image label formats have been developed for use by nearly all    
  290. image processing facilities.  Two formats are widely used within the          
  291. planetary and astronomy communities: the VICAR2 (Video Image Communication    
  292. and Retrieval) labels used by the Multi-Mission Image Processing Laboratory   
  293. (MIPL) and FITS (Flexible Image Transport) labels used for astronomy image    
  294. interchange.  The PDS has developed a label scheme which is very similar to   
  295. these standards, called the Object Description Language (ODL).  This format   
  296. attempts to add a broader range of data descriptive capabilities to the       
  297. proven capabilities of the existing label systems.                            
  298.                                                                               
  299.    Most of the images stored on the PDS CD-ROM disks have either ODL or       
  300. VICAR2 labels.  IMDISP will automatically interpret these labels to           
  301. determine the display format of the image data.                               
  302.                                                                               
  303.                  |------------------------------------|                       
  304.                  | PDS ODL Labels                     |                       
  305.                  |---------------------|--------------|                       
  306.                  | Image Array Line 1  | Line Suffix  |                       
  307.                  |---------------------|--------------|                       
  308.                  | Image Array Line 2  | Line Suffix  |                       
  309.                  |---------------------|--------------|                       
  310.                                    .                                          
  311.                                    .                                          
  312.                                    .                                          
  313.                  |---------------------|--------------|                       
  314.                  | Image Array Line 800| Line Suffix  |                       
  315.                  |---------------------|--------------|                       
  316.                  | Image Engineering Trailer          |                       
  317.                  |------------------------------------|                       
  318.                  | Image Histogram                    |                       
  319.                  |------------------------------------|                       
  320.                                                                               
  321.                                                                               
  322.                  Figure 2-2: Voyager CD-ROM Image Format                      
  323.                                                                               
  324.                                                                               
  325. 2.6 CD-ROM FUNDAMENTALS                                                       
  326.                                                                               
  327.                                                                               
  328.    The CD-ROM disk uses the same basic data storage format as a CD audio      
  329. disk.  In fact, data blocks are identified by minute, second and sector       
  330. number, following the audio format.  Data blocks are recorded along a         
  331. spiral from the inner to the outer radius of the disk.  Each raw data block   
  332. (sector) contains 2,352 bytes of information, with 304 bytes used for         
  333. housekeeping and error correction and 2,048 (2K) containing user data.        
  334. Each data block is called a sector, and 75 sectors are stored per second.     
  335. Since the nominal playing time of a CD disk is 60 minutes, the data storage   
  336. capacity is 75 sectors per second * 60 seconds per minute * 60 minutes or     
  337. 270,000 sectors.  Thus the nominal storage capacity of a single CD-ROM disk   
  338. is 540,000 kilobytes, which can be extended to more than 600,000 kilobytes    
  339. and beyond by recording more than 60 minutes of data on a disk.               
  340.                                                                               
  341.    In order to maximize the storage capacity of CD disks a constant linear    
  342. velocity (CLV) recording format is used.  This means that the player          
  343. changes speed (slows down) as it reads from the inside to the outside of      
  344. the disk, to maintain a constant flow of data under the read mechanism at a   
  345. speed of 1.2 meters per second.  This is in contrast to most magnetic disk    
  346. drives which use constant angular velocity (CAV) storage, where the           
  347. information density is greater on the inner tracks that the outer tracks.     
  348. While the use of CLV recording increases the storage capacity of CD-ROM       
  349. disks, it lengthens access time, since the disk must change speeds as it      
  350. moves to different positions on the disk radius.  The strategy for locating   
  351. a recorded data block is also more complicated than with constant angular     
  352. velocity recording technology.                                                
  353.                                                                               
  354.    As a result the average access time of CD-ROM drives is between 400 ms     
  355. and 1 s, and the maximum data transfer rate to the host computer is 150       
  356. kilobytes per second.  These rates are approximately an order of magnitude    
  357. slower than magnetic disks.  Therefore, the access mechanisms to disk         
  358. directories and data must be customized for CD-ROM in order to provide        
  359. acceptable performance.                                                       
  360.                                                                               
  361.    The development of a standard logical format for recording data files on   
  362. CD-ROM disks was taken on by a group of CD-ROM applications developers,       
  363. hardware vendors and computer vendors.  The proposed standard resulting       
  364. from this initial effort was called the High Sierra format.  This format      
  365. was submitted to the International Standards Organization (ISO) for           
  366. consideration and approved on October 5, 1987.  It is now referred to as      
  367. the ISO-9660 standard.  The format used for the early PDS CD-ROM disks is     
  368. dated May 28, 1986, and differs slightly from the final ISO standard.         
  369. Microsoft and other CD-ROM software developers have committed to supporting   
  370. this preliminary version of the format in later software releases.            
  371. However, software developed by other vendors to support the ISO format (DEC   
  372. for example) will not support the format of these early disks.                
  373.                                                                               
  374.                                                                               
  375.                                                                               
  376.                                Chapter 3                                      
  377.                                                                               
  378.                           IMDISP INSTALLATION                                 
  379.                                                                               
  380.                                                                               
  381.    IMDISP requires an IBM PC, XT, AT or 100 percent compatible with 512K of   
  382. base memory.  It supports several graphics display devices, including the     
  383. Enhanced Graphics Adapter (EGA), the Video Graphics Array (VGA), the          
  384. Professional Graphics Adapter (PGA), and the Color Graphics Adapter (CGA).    
  385. The hardware environment in which the program has been developed and tested   
  386. includes and AT class computer, deluxe or enhanced EGA board with 256K of     
  387. memory, selected VGA boards with 512K or 1MB memory, and MultiSync (tm) or    
  388. multiscan monitor.                                                            
  389.                                                                               
  390.                                                                               
  391. 3.1 PROGRAM SETUP                                                             
  392.                                                                               
  393.                                                                               
  394.    The IMDISP program can be run from a floppy or hard disk.  To use the      
  395. program from a floppy disk, insert the program disk in the A: or B: drive     
  396. and type the MS-DOS command: "A:" or "B:" to set the floppy disk as the       
  397. default drive.  To use the program from hard disk first create a directory    
  398. to hold the IMDISP files.  Use the MS-DOS command "MKDIR \IMDISP" to create   
  399. a directory to hold the programs.  Use the "CHDIR \IMDISP" command to make    
  400. IMDISP the default directory.  Insert the distribution floppy disk in         
  401. floppy disk drive A:.  Now type "COPY A:*.*" to copy the files from the       
  402. distribution disk to your hard disk.  You should now be able to run all       
  403. examples from that directory on your hard disk.  If you wish to use IMDISP    
  404. from other directories, you need to include the IMDISP directory in your      
  405. MS-DOS "PATH" command.  This command provides MS-DOS with a list of           
  406. directories to search when looking for a program file to run.  If you wish    
  407. to run IMDISP from different directories, the \IMDISP subdirectory should     
  408. be added to the PATH command in your AUTOEXEC.BAT file.  A sample path        
  409. command would look like this:                                                 
  410.                                                                               
  411.                  PATH=C:\DOS;C:\UTIL;C:\WORDSTAR;C:\IMDISP                    
  412.                                                                               
  413.    You may want to add a line to your AUTOEXEC.BAT file which will allow      
  414. you to abort the display program while running batch files or displaying      
  415. large image files.  If the command "BREAK=ON" is placed in CONFIG.SYS, you    
  416. will (sometimes) be able to terminate the IMDISP program by typing the        
  417. control and break keys simultaneously.  Different computer systems offer      
  418. varying response to the control-break command, and the use of this command    
  419. may effect other programs you use.                                            
  420.                                                                               
  421.    You can set IMDISP to start up in the correct display mode for your        
  422. video system by specifying the environment variable IMDISP in your            
  423. AUTOEXEC.BAT file.  A sample command to do this would look like this:         
  424.                                                                               
  425.                             SET IMDISP=ORCHID800                              
  426.                                                                               
  427. if you have an Orchid ProDesigner super VGA board with 512K of video          
  428. memory.  See section 3.3 for a description of all the possible supported      
  429. video modes.                                                                  
  430.                                                                               
  431.    IMDISP also builds various scratch files for use when browsing images or   
  432. executing DOS functions.  By default, they go in the root directory on        
  433. drive C:.  If you wish to have them written somewhere else, you may do that   
  434. by specifying the desired directory in the environment variable IMBROWSE.     
  435. A sample command to do this would look like this:                             
  436.                                                                               
  437.                            SET IMBROWSE=D:\TEMP\                              
  438.                                                                               
  439. This will make IMDISP write its scratch files in the subdirectory TEMP on     
  440. drive D:.  Note that the final backslash (\) is required.  We recommend       
  441. that the drive specified by IMBROWSE have at least 512K of free space - the   
  442. scratch file written when using any of the DOS system calls can be as large   
  443. as that.                                                                      
  444.                                                                               
  445. Also, if you have a collection of color palettes in a separate                
  446. subdirectory, you can specify this directory as being the default palette     
  447. directory.  For example:                                                      
  448.                                                                               
  449.                      SET IMPALETTE=D:\IMAGES\PALETTES\                        
  450.                                                                               
  451. will tell IMDISP to look in the D:\IMAGES\PALETTES directory first when       
  452. loading in a color palette with the PAL LOAD command.                         
  453.                                                                               
  454. IMDISP can use extended memory, managed by an XMS memory driver like          
  455. HIMEM.SYS or QEMM, for its refresh buffer.  If no extended memory is          
  456. available, IMDISP will not set up a refresh buffer by default, but will       
  457. allow the user to open a disk file to be used for refreshing the screen.      
  458. In this case, the environment variable IMREFRESH defines where the refresh    
  459. buffer is to go, so                                                           
  460.                                                                               
  461.                              SET IMREFRESH=G:\                                
  462.                                                                               
  463. tells IMDISP to put the refresh buffer in the root directory of drive G:.     
  464. Note that the refresh buffer can be quite large - a 1024x768 display will     
  465. require 768K of disk space (or XMS memory) to hold the entire buffer.         
  466.                                                                               
  467.                                                                               
  468. 3.2 CD-ROM SETUP                                                              
  469.                                                                               
  470.                                                                               
  471.    To use the IMDISP program with PDS CD-ROM disks you will need a CD-ROM     
  472. reader, interface board, and software provided by the vendor which will       
  473. make your CD Reader look like a disk drive to your PC.  The details of        
  474. setting up your hardware and software configuration are beyond the scope of   
  475. this manual, however several aspects of setup will be reviewed.               
  476.                                                                               
  477.    There are many potential pitfalls in setting up your hardware and          
  478. interface board.  Read the directions carefully, and don't assume that        
  479. "default" switch settings are correct.  Check all switches to see that they   
  480. correspond to the recommended settings.                                       
  481.                                                                               
  482.    To work properly with the batch command and label files provided with      
  483. IMDISP, your CD-ROM drive should be set up to be drive letter "L:".  Most     
  484. vendor software allows you to select the drive letter which will be           
  485. assigned to the CD-ROM reader.                                                
  486.                                                                               
  487.                                                                               
  488. 3.2.1 Microsoft Extensions                                                    
  489.                                                                               
  490.                                                                               
  491.    If you are using the Microsoft Extensions you will load a CD-ROM device    
  492. driver as part of your CONFIG.SYS file (or two drivers if using the Philips   
  493. or DEC readers) with a line like this:                                        
  494.                                                                               
  495.    DEVICE=HITACHI.SYS /D:CDROM1 /N:1                                          
  496.                                                                               
  497. This command assumes that the driver file "HITACHI.SYS"is located in your     
  498. ROOT directory.  The /D:CDROM1 switch assigns a logical name CDROM1 to the    
  499. drive.  A name must be supplied, and is used to identify this device, in      
  500. case more than one CD-ROM drive is being used on your system.  The name       
  501. should not be the same as the name of any file stored on your system.  An     
  502. attempt to open a file with the same name as the device driver will result    
  503. in the device driver being opened, not the file.  The /N:1 switch indicates   
  504. that this is drive 1.  This switch is used since some CD-ROM interface        
  505. cards support multiple drives.                                                
  506.                                                                               
  507.    Other commands which should be included in CONFIG.SYS if you are using a   
  508. CD-ROM drive with the Microsoft Extensions are:                               
  509.                                                                               
  510.    LASTDRIVE=Z                                                                
  511.    FILES=30                                                                   
  512.    BUFFERS=50                                                                 
  513.                                                                               
  514.    The LASTDRIVE command tells MS-DOS to allow for enough drive letters to    
  515. support the CD-ROM drive, plus any other drives on your system.  Using        
  516. LASTDRIVE=L should also work in most circumstances.  The files and buffers    
  517. specifications provide sufficient system work area to support CD-ROM          
  518. operations.                                                                   
  519.                                                                               
  520.    You must also execute a program called MSCDEX.EXE which allows access to   
  521. the CD-ROM drive as if it were a disk drive on your system.  This command     
  522. can be put in your AUTOEXEC.BAT file so that it is automatically run          
  523. whenever you start-up your computer.  The command format is:                  
  524.                                                                               
  525.    MSCDEX /D:CDROM1 /L:L /M:20 /V /E                                          
  526.                                                                               
  527.    Several MSCDEX command switches are illustrated.  The /L:L command         
  528. assigns the drive name L: to the CD-ROM drive.  The /D switch gives the       
  529. device name of the CD-ROM drive (which must be the same name used in the      
  530. device name parameter of  the "DEVICE=CDROM.SYS" command in the CONFIG.SYS    
  531. file.  The /M:20 switch assigns twenty 2K blocks of memory as a buffer for    
  532. use with CD-ROM data.  The /V switch provides verbose messages when the       
  533. installation program is run, and /E tells the program to use expanded         
  534. memory for the cache area.                                                    
  535.                                                                               
  536.                                                                               
  537. 3.2.2 Other Driver Software                                                   
  538.                                                                               
  539.                                                                               
  540.    Some vendors (Reference Technology, TMS) offer CD-ROM software which is    
  541. comparable to the Microsoft Extensions.  Our experience with these software   
  542. packages is that they modify the internals of MS-DOS and may cause            
  543. unpredictable results with your other PC software.  They often do not         
  544. support CD-ROM applications designed to work with the MS-DOS extensions for   
  545. CD-ROM and cannot be used with the IMDISP FILE prompt mode.                   
  546.                                                                               
  547.                                                                               
  548. 3.2.3 Problems with CD-ROM Software                                           
  549.                                                                               
  550.                                                                               
  551.    The PDS CD-ROM disks utilize a feature of the CD-ROM format standard       
  552. which provides extended attribute records to define the physical              
  553. characteristics of data files.  These records will be used by VAX and other   
  554. minicomputer systems where the operating system allows a variety of record    
  555. formats (fixed, variable, stream).  Many of the earlier implementations of    
  556. High Sierra software failed to recognize these records, which are placed at   
  557. the beginning of a file's data area.  If your CD-ROM software was developed   
  558. prior to April 1987, it may interpret these records as part of the data       
  559. file, causing the first 2K bytes of each file to appear as meaningless        
  560. binary data.  Users with this problem should contact their hardware or        
  561. software vendors for updated versions of the CD-ROM software.  The IMDISP     
  562. program has been patched to recognize and skip over these records on the      
  563. PDS CD-ROM disks, but these patches may not support other CD-ROM disks with   
  564. extended attribute records.                                                   
  565.                                                                               
  566.                                                                               
  567. 3.3 DISPLAY DEVICE CHARACTERISTICS                                            
  568.                                                                               
  569.                                                                               
  570.    IMDISP automatically finds out which display devices are available (PGA,   
  571. EGA, or CGA) and uses the one available.  The Enhanced Graphics Adapter       
  572. must have at least 128K of memory to work properly.  Use of the Color         
  573. Graphics Adapter is discouraged because the pixels have no gray levels,       
  574. only black or white.                                                          
  575.                                                                               
  576.    The display coordinates start at (1,1) in the upper left corner of the     
  577. screen; the line direction is down and the sample direction is to the         
  578. right.                                                                        
  579.                                                                               
  580.                                                                               
  581. 3.3.1 Enhanced Graphics Adapter (EGA)                                         
  582.                                                                               
  583.                                                                               
  584.    The EGA is a bit-mapped display device providing a resolution of 350       
  585. lines by 640 samples of 4-bits each.  It produces a digital video signal      
  586. for each primary color (red, green and blue), The video signal for each       
  587. color can be set to one of four levels, roughly equivalent to off, low,       
  588. medium and high.  Thus the number of possible colors (color palette) is 64    
  589. (4^3).  The following table illustrates the colors created by some of the     
  590. different combinations of red, green and blue.                                
  591.                                                                               
  592.       Red=   off, Green=   off, Blue=   off  results in Black                 
  593.       Red=   low, Green=   off, Blue=   off  results in Dark Red              
  594.       Red=medium, Green=   off, Blue=   off  results in Light Red             
  595.       Red=  high, Green=   off, Blue=   off  results in Bright Red            
  596.       Red=   low, Green=   low, Blue=   low  results in Dark Gray             
  597.       Red=medium, Green=   low, Blue=   off  results in Brown                 
  598.       Red=medium, Green=medium, Blue=   off  results in Yellow                
  599.       Red=medium, Green=medium, Blue=medium  results in Light Gray            
  600.       Red=  high, Green=   low, Blue=   off  results in Orange                
  601.       Red=  high, Green=  high, Blue=  high  results in White                 
  602.                                                                               
  603.               Table 3-1: Sample EGA Color Palette Settings                    
  604.                                                                               
  605.                                                                               
  606.    The EGA display is limited to only 16 colors out of the 64 possible,       
  607. because only 4-bits are used to store each pixel value in memory.  This       
  608. 4-bit pixel value points to an entry in the color table which represents      
  609. one of the 64 possible combinations of red, green and blue which can be       
  610. displayed.                                                                    
  611.                                                                               
  612.    Many of the newer EGA boards are capable of displaying additional lines    
  613. and samples when using a MultiSync (tm) or Multiscan monitor.  The standard   
  614. EGA uses a 16 Mhz crystal oscillator (something like a clock which            
  615. regulates the display speed), which limits the video output rate to the       
  616. equivalent of 640 pixels by 350 lines.  The EGA circuitry allows for a        
  617. faster crystal oscillator to be added to the board (24 Mhz and beyond)        
  618. allowing about 25 percent more lines to be displayed (480 lines instead of    
  619. 350).  A method for adding this capability to an existing EGA board (for      
  620. about $10 worth of parts) is described in the September 16, 1986 issue of     
  621. PC Magazine.                                                                  
  622.                                                                               
  623.    This mode requires that a MultiSync (tm) or multiscan monitor be           
  624. attached to the computer, and there is no way for the program to              
  625. automatically detect the presence of the special monitor.  Therefore this     
  626. display mode is invoked by specifying an MS-DOS "ENVIRONMENT" variable.       
  627. This is done by issuing an MS-DOS "SET" command at the MS-DOS prompt as       
  628. follows:                                                                      
  629.                                                                               
  630.    SET IMDISP=EGA480                                                          
  631.                                                                               
  632.    This command can also be put in your AUTOEXEC.BAT file using a text        
  633. editor, so that you need not invoke it each time you run IMDISP.  It should   
  634. have no effect on other MS-DOS system operations.  There is a chance that     
  635. adding this variable will exceed the size reserved by MS-DOS for environment  
  636. variables.  If so, you should consult your MS-DOS manual to increase the      
  637. environment size on your system.  The environment variable can be removed     
  638. with the MS-DOS command:                                                      
  639.                                                                               
  640.    SET IMDISP=                                                                
  641.                                                                               
  642. where a carriage return is typed immediately after the equal sign.  The 480   
  643. line mode requires an additional 83K of memory for the refresh buffer.  If    
  644. you try this mode and receive the message "Insufficient memory for line       
  645. buffer", it is probably because you have a 512K memory machine, or have       
  646. memory resident programs operating (like Sidekick or Superkey) which reduce   
  647. the available memory to less than about 400K.  You will need to use the 350   
  648. line mode or remove some memory resident programs to operate in 480 line      
  649. mode.                                                                         
  650.                                                                               
  651.                                                                               
  652. 3.3.2 Video Graphics Array (VGA)                                              
  653.                                                                               
  654.                                                                               
  655.    This version (7.9) of the IMDISP program includes support for the IBM      
  656. Video Graphics Array (VGA) display device.  The VGA produces an analog        
  657. display with several new color modes.  Of particular interest to IMDISP       
  658. users are the 640 x 480 line mode with 16 displayable colors (or gray         
  659. levels).  The 320 x 200 line mode with 256 displayable colors (or 64 gray     
  660. levels) has been tested but produces very blocky pixels.  This version of     
  661. IMDISP also supports a number super VGA graphic boards (see below).           
  662.                                                                               
  663.    To set the VGA display mode you must set a MS-DOS environment variable     
  664. prior to executing IMDISP.                                                    
  665.                                                                               
  666.    To set the environment variable use the MS-DOS command:                    
  667.                                                                               
  668.    SET IMDISP=VGA                                                             
  669.                                                                               
  670. This will put the display in 640 sample by 480 line mode, with 16 gray        
  671. levels or colors displayable from a palette of 256K.  The display is          
  672. initialized with a gray scale palette, but a pseudocolor palette can be       
  673. invoked with the IMDISP command "PAL PS 0".  The "PALETTE EDIT" command       
  674. will allow you to step forward or backward through the 64 available shades    
  675. for each primary color.  See the next section of the IMDISP manual for more   
  676. information on the palette edit function.                                     
  677.                                                                               
  678.                                                                               
  679.    Users may experiment with the 320 x 200 VGA mode by using                  
  680.                                                                               
  681.    SET IMDISP=VGA320                                                          
  682.                                                                               
  683. The pixels are rather large in this mode, but there are enough colors to      
  684. display images nicely.                                                        
  685.                                                                               
  686.                                                                               
  687. 3.3.3 Professional Graphics Adapter (PGA)                                     
  688.                                                                               
  689.                                                                               
  690.    The PGA is a special graphics board developed by IBM for use with          
  691. CAD/CAM applications on the IBM PC.  Because its architecture is              
  692. incompatible with the CGA and EGA boards, it has not been well received by    
  693. software developers.  The PGA provides an analog video signal with a          
  694. display resolution of 480 lines by 640 samples of 8-bits each.  It provides   
  695. 16 intensities for each primary color, resulting in a palette of 4,096        
  696. colors (16^3).  The color table allows 256 colors to be displayed             
  697. simultaneously, however only 16 gray levels can be selected.                  
  698.                                                                               
  699.    Use the command:                                                           
  700.                                                                               
  701.    SET IMDISP=PGA                                                             
  702.                                                                               
  703. at the MS-DOS prompt to force IMDISP to go into PGA display mode.             
  704.                                                                               
  705.                                                                               
  706. 3.3.4 Color Graphics Adapter (CGA)                                            
  707.                                                                               
  708.                                                                               
  709.    The CGA display is a bit-mapped graphics device with a resolution of 200   
  710. lines by 640 samples of 1-bit each.  It supports only 2 colors in this        
  711. display mode, black and white.  This display can be used to get a general     
  712. idea of the contents of a digital image, or for displaying one bit images     
  713. (graphics for example) but is not recommended for use with the PDS CD-ROM     
  714. images.                                                                       
  715.                                                                               
  716.    To force a multi-function display card into CGA mode, use:                 
  717.                                                                               
  718.    SET IMDISP=CGA                                                             
  719.                                                                               
  720.                                                                               
  721. 3.3.5 Super VGA Display Boards                                                
  722.                                                                               
  723.                                                                               
  724.    Several high resolution display boards are supported by this version of    
  725. IMDISP.   Most of them support resolutions with 256 colors or 64 grayscale    
  726. levels.  Select one from the following list if it matches your display        
  727. board:                                                                        
  728.                                                                               
  729.        SET IMDISP=     Resolution     Board Name                              
  730.            ATI640      640x480x256    ATI VGA Wonder Board (512K)             
  731.            ATI800      800x600x256    ATI VGA Wonder Board (512K)             
  732.            ATI1024     1024x768x16    ATI VGA Wonder Board (512K)             
  733.            EVGA512     512x480x256    Everex EV-673 Board  (256K)             
  734.            EVGA640     640x400x256    Everex EV-673 Board  (256K)             
  735.            ORCHID      640x480x256    Orchid ProDesigner+ Board (512K)        
  736.            ORCHID800   800x600x256    Orchid ProDesigner+ Board (512K)        
  737.            ORCHID1024 1024x768x256    Orchid ProDesigner+ Board (1MB)         
  738.            PARADISE    640x480x256    Paradise VGA Board (400 lines if the    
  739.                                       board has 256K of memory)               
  740.            TRIDENT     640x480x256    Trident-based SVGA boards (512K)        
  741.            VESA       1024x768x256    VESA SVGA Interface (1MB) (not fully    
  742.                                       implemented)                            
  743.                                                                               
  744.                                                                               
  745. 3.4 MULTIPLE BUFFERS                                                          
  746.                                                                               
  747. Multiple copies of images (or the entire screen) can now be copied and        
  748. stored away into buffers, limited by the available memory.  If you don't      
  749. have enough memory, the buffers can still be used, but as virtual files       
  750. (see HINTS & TIPS ON CONSERVING MEMORY, down below).  Using the buffers,      
  751. images can now be merged together to create interesting effects.  You can     
  752. add or subtract images from each other.  You can store an image away into a   
  753. buffer before applying a filter, and if you didn't like the result, then      
  754. retrieve it back from the buffer, effectively creating an UNDO feature.       
  755. You can create a "face-on-Venus image" by merging the face-on-Mars image      
  756. with a Magellan image.                                                        
  757.                                                                               
  758. There are 26 buffers available in IMDISP, limited by memory or disk space.    
  759. The buffers are referenced by name as a single letter, one for each letter    
  760. of the alphabet (A-Z).                                                        
  761.                                                                               
  762.                                                                               
  763. 3.5 HINTS & TIPS ON CONSERVING MEMORY                                         
  764.                                                                               
  765. If you have no extended memory, or don't have enough extended memory, don't   
  766. despair.  You can still use the buffers if you use the following tips to      
  767. help you maximize the use of the memory                                       
  768.                                                                               
  769.      o IMDISP will automatically create a refresh buffer in extended memory   
  770.        whose size is the size of the screen.  You can disable the refresh     
  771.        buffer and this memory will be freed up for buffer use.  To disable    
  772.        the refresh buffer, type:                                              
  773.                                                                               
  774.            SET REFRESH OFF                                                    
  775.                                                                               
  776.        The refresh buffer can be enabled with                                 
  777.                                                                               
  778.            SET REFRESH ON                                                     
  779.                                                                               
  780.      o IMDISP will also attempt to load an entire image into extended         
  781.        memory whenever you do the FILE command.  You can have IMDISP not do   
  782.        this by using the NOMEMORY option:                                     
  783.                                                                               
  784.            FILE IO.IMG NOMEMORY                                               
  785.                                                                               
  786.      o If you are using a Super VGA graphics card in its highest              
  787.        resolution, then if you switch to a lower screen resolution, this      
  788.        will generally cause the buffers to be smaller.  For example, if you   
  789.        using an Orchid Pro Designer II card in its highest resolution         
  790.        (1024x768), then you can switch to the 800x600 or 640x480 screen       
  791.        resolutions:                                                           
  792.                                                                               
  793.             SET DIS ORCHID800                                                 
  794.             SET DIS ORCHID                                                    
  795.                                                                               
  796.      o Subsample the image so that it doesn't take up the entire screen,      
  797.        which then can be saved to smaller buffers:                            
  798.                                                                               
  799.              DISP SUB 3                                                       
  800.                                                                               
  801.      o Use the FILE option on the COPY or MERGE commands to store buffers     
  802.        into a file instead of extended memory.                                
  803.                                                                               
  804.      o Erase any unused buffers:                                              
  805.                                                                               
  806.               ERASE A                                                         
  807.                                                                               
  808. 3.6 THE HELP FILE                                                             
  809.                                                                               
  810.    The HELP command in IMDISP uses a plain text file, called IMDISP.HLP,      
  811. which contains brief summaries of each command and its options.  This file    
  812. can be modified as you wish with any text editor or word processor capable    
  813. of saving files in plain ASCII format.                                        
  814.                                                                               
  815.    IMDISP looks in several places to try to find the help file when the       
  816. program starts.  First, the DOS environment is searched for the environment   
  817. variable IMHELP.  If IMHELP is found, and contains a file name, the program   
  818. will attempt to open that file (so you can call the help file anything you    
  819. want).  If IMHELP contains only the name of a subdirectory, the program       
  820. will attempt to open IMDISP.HLP in that directory.  If that fails, or if      
  821. IMHELP is not set, the program then looks in the current directory for        
  822. IMDISP.HLP.  If IMDISP.HLP isn't found in the current directory, and if you   
  823. are using MS-DOS v3.3 or later, the program tries to open the help file in    
  824. the directory where the IMDISP.EXE program file is located.  If all these     
  825. fail, the program reports that it can't open the help file and continues.     
  826.                                                                               
  827.    For example, to use a file called MYHELP.IMD, located in the               
  828. subdirectory C:\HELPFILES, instead of using the default file IMDISP.HLP,      
  829. issue the command                                                             
  830.                                                                               
  831.       SET IMHELP=C:\HELPFILES\MYHELP.IMD                                      
  832.                                                                               
  833. either at the DOS prompt or in your AUTOEXEC.BAT file.  To use the file       
  834. IMDISP.HLP, but to allow the program to find it in the subdirectory           
  835. C:\HELPFILES, issue the command                                               
  836.                                                                               
  837.       SET IMHELP=C:\HELPFILES                                                 
  838.                                                                               
  839. or                                                                            
  840.                                                                               
  841.       SET IMHELP=C:\HELPFILES\                                                
  842.                                                                               
  843.                                  Chapter 4                                    
  844.                                                                               
  845.                               IMDISP OPERATION                                
  846.                                                                               
  847.                                                                               
  848.    IMDISP can be used to display images up to several thousand lines and      
  849. samples with a variety of pixel formats.  These formats include bit (1        
  850. bit), nibble (4 bits), byte (8 bits), integer (16 bits) or long integer (32   
  851. bits).  Integer pixels may be byte-swapped, which means that the sign and     
  852. most significant 7 bits are in the rightmost byte, and the least              
  853. significant 8 bits are in the leftmost byte.  This is the convention used     
  854. by both the IBM PC and VAX computer hardware families.  IBM mainframes and    
  855. 68000 series computers (Macintosh and Sun, for example) use non-byte-         
  856. swapped integers.                                                             
  857.                                                                               
  858.    Program interaction with the user is via commands typed in response to     
  859. the "COMMAND:" prompt.  Most interaction is performed on the graphic          
  860. display screen, and program messages are printed over any image display       
  861. currently on the screen.  The REFRESH command can be used to restore an       
  862. image after other commands have written text over the display.  The ERASE     
  863. command can be used to clear away the clutter left by program status          
  864. messages and previously displayed images.  The screen is not automatically    
  865. erased after each operation in order that multiple images can be displayed    
  866. simultaneously, or so a histogram can be placed on the screen with the        
  867. image.                                                                        
  868.                                                                               
  869.    IMDISP is invoked by typing "IMDISP" or "IMDISP filename", where           
  870. filename is the name of an image file to be opened for processing at          
  871. program start-up.  The filename may include a disk drive and path name        
  872. specification.                                                                
  873.                                                                               
  874.    The program will blank the display screen and display a welcome logo,      
  875. then the prompt "COMMAND:" will appear in the lower left portion of the       
  876. screen.  If a filename is included in the command invocation, the welcome     
  877. message is not displayed and the screen will display the COMMAND: prompt.     
  878.                                                                               
  879.    Typing "HELP" at the command prompt will provide a list of IMDISP          
  880. commands.  The most frequently used commands are "FILE" to open a file for    
  881. processing, and "DISPLAY" to display an image once the file has been          
  882. opened.                                                                       
  883.                                                                               
  884.    Previous commands can be recalled for editing, so you don't have to type   
  885. them over again.  Use the up arrow (or cursor up) key to recall old           
  886. commands.  The left and right arrow (cursor) keys move you back and forth     
  887. in the command.  Make whatever changes you want, then press the Enter key     
  888. to execute the command.                                                       
  889.                                                                               
  890.                                                                               
  891. 4.1 COMMAND SYNTAX                                                            
  892.                                                                               
  893.                                                                               
  894.    The command line syntax is of the form:                                    
  895.                                                                               
  896.   COMMAND KEYWORD1 = VALUE1 KEYWORD2=VALUE2 KEYWORD3 VALUE3 ...               
  897.                                                                               
  898.    The command line may be typed in either upper or lower case.  The          
  899. command and the keyword names may be abbreviated to 3 characters in most      
  900. cases.  Any number of spaces may be inserted between words, and the keyword   
  901. and value may be separated by a space or an equals sign.  Some keywords do    
  902. not require a value.  All keywords are optional and have default values.      
  903.                                                                               
  904.                                                                               
  905. 4.2 COMMAND DESCRIPTION                                                       
  906.                                                                               
  907.                                                                               
  908.    Table 4-1 presents a summary of IMDISP commands.  They are separated       
  909. into 3 groups, file manipulation commands; display commands and program       
  910. control commands.  Only the capitalized letters are required to specify a     
  911. command.                                                                      
  912.                                                                               
  913.                                                                               
  914. 4.3 OPERATING MODES                                                           
  915.                                                                               
  916.                                                                               
  917.    Several of the commands invoke special program operating modes.  These     
  918. include the FILE command when issued without a filename argument and the      
  919. CURSOR, PROFILE and PALETTE EDIT commands.  The FILE mode displays a list     
  920. of files in the current directory on the screen for selection.  It also       
  921. contains several subcommands for controlling the display of files on the      
  922. menu screen.  In the CURSOR, PROFILE and PALETTE EDIT commands the cursor     
  923. keys (arrow keys) on the numeric keypad are used in conjunction with other    
  924. keys to control program operation.  These modes are exited by typing either   
  925. a period '.' or carriage return.                                              
  926.                                                                               
  927. File oriented commands:                                                       
  928.                                                                               
  929.     CD or CHDIR .  .  .  .  to change the default directory                   
  930.     DIRECTORY   .  .  .  .  to perform the MS-DOS directory command           
  931.     FILE        .  .  .  .  to specify the name of the image                  
  932.     LABEL       .  .  .  .  to display the image labels                       
  933.     LOG         .  .  .  .  to save (log) commands to a text file             
  934.     SAVE        .  .  .  .  to save the image display to a file               
  935.     TYPE        .  .  .  .  to perform the MS-DOS type command                
  936.                                                                               
  937. Display commands:                                                             
  938.                                                                               
  939.     BROWSE      .  .  .  .  to display a group of images                      
  940.     CURSOR      .  .  .  .  to move the cursor around                         
  941.     DISPLAY     .  .  .  .  to display the image                              
  942.     ERASE       .  .  .  .  to erase the display                              
  943.     HISTOGRAM   .  .  .  .  to display the histogram of the image             
  944.     OVERLAY     .  .  .  .  to place an overlay on the image                  
  945.     PALETTE     .  .  .  .  to adjust the palette for the display             
  946.     PERSPECTIVE .  .  .  .  to plot a pseudo-perspective of the image         
  947.     PLOT        .  .  .  .  to plot image lines and spectra on the display    
  948.     PROFILE     .  .  .  .  to plot a profile of the image                    
  949.     REFRESH     .  .  .  .  to refresh the image plane                        
  950.     SET         .  .  .  .  to set display options                            
  951.     TEXT        .  .  .  .  to draw text on the image                         
  952.                                                                               
  953. Image processing commands:                                                    
  954.                                                                               
  955.     BRIGHTEN    .  .  .  .  to brighten the image                             
  956.     COPY        .  .  .  .  to copy images to/from memory buffers             
  957.     DARKEN      .  .  .  .  to darken the image                               
  958.     ENHANCE     .  .  .  .  to apply various filters to the image:            
  959.          BAALKE                                                               
  960.          CONVOLUTION                                                          
  961.          EDGE                                                                 
  962.          HIGH                                                                 
  963.          HISTOGRAM                                                            
  964.          LOG                                                                  
  965.          MEAN                                                                 
  966.          MEDIAN                                                               
  967.          POWER                                                                
  968.          STAIR                                                                
  969.          SMEAR                                                                
  970.          UNSHARP                                                              
  971.     MASK        .  .  .  .  to mask off pixels in the image                   
  972.     MERGE       .  .  .  .  to combine image and memory buffers               
  973.     NEG         .  .  .  .  to invert the color palette                       
  974.     PALETTE     .  .  .  .  to adjust the palette for the display             
  975.     ROTATE      .  .  .  .  to rotate the image                               
  976.     SLANT       .  .  .  .  to slant the image to the right or left           
  977.     STRETCH     .  .  .  .  to do a linear gray scale stretch                 
  978.     WINDOW      .  .  .  .  to mark off a subimage on the screen              
  979.                                                                               
  980.                                                                               
  981. Program control commands:                                                     
  982.                                                                               
  983.     BATCH       .  .  .  .  to execute a batch command file                   
  984.     EXIT or QUIT.  .  .  .  to exit from the program                          
  985.     HELP        .  .  .  .  Display help information                          
  986.     MENU        .  .  .  .  to select images from a menu file                 
  987.     SYSTEM      .  .  .  .  execute an MS-DOS command                         
  988.                                                                               
  989.          Table 4-1: IMDISP Command Summary                                    
  990.                                                                               
  991.                                                                               
  992. 4.4 ERROR HANDLING                                                            
  993.                                                                               
  994.                                                                               
  995.    If an invalid command is issued at the COMMAND: prompt the program will    
  996. beep and return to the COMMAND: prompt.  In handling command parameters the   
  997. program takes action on those parameters that are recognized, but ignores     
  998. invalid parameters.                                                           
  999.                                                                               
  1000.    It is also possible for certain system errors to be encountered which      
  1001. cause the program to abort leaving your computer in graphics mode.  If you    
  1002. are using certain utilities which reset the default text mode screen colors   
  1003. (like the Norton Utilities screen attributes command) you may not be able     
  1004. to see what is being printed on the screen.  The simplest approach is to      
  1005. perform a warm boot, by typing the Ctrl, Alt, Del keys simultaneously.        
  1006. Alternately, you can often type IMDISP then EXIT to reset the computer to     
  1007. text mode.  Errors in processing image files on CD-ROM, hard disk or floppy   
  1008. disks can cause these aborts.                                                 
  1009.                                                                               
  1010.                                                                               
  1011. 4.5 COMMAND REFERENCE                                                         
  1012.                                                                               
  1013.                                                                               
  1014.    This section lists all IMDISP commands alphabetically and describes        
  1015. their function, parameters which control  command operation, and provides     
  1016. examples of command use, In the command and parameter description the         
  1017. following conventions are used:                                               
  1018.                                                                               
  1019.    filename    represents the name of an MS-DOS file, and may include an      
  1020.                optional drive identifier and path specification.              
  1021.                                                                               
  1022.    n           represents an integer value.                                   
  1023.                                                                               
  1024.                                                                               
  1025. 4.5.1 BATCH                                                                   
  1026.                                                                               
  1027.                                                                               
  1028.    The BATCH command reads commands from the specified batch command file.    
  1029. If no file name is specified the current directory is searched for a file     
  1030. named BATCH.CMD.  The CURSOR, PROFILE and PALETTE EDIT commands should not    
  1031. be used within batch command files since they require interactive inputs      
  1032. from the keyboard.  Batch files may be nested.                                
  1033.                                                                               
  1034.    The BATCH command may take the following argument:                         
  1035.                                                                               
  1036.    filename    filename of batch command file.                                
  1037.                                                                               
  1038.    A batch file is simply a text file containing a list of commands, with     
  1039. each command terminated by a carriage return.  You can add comments to a      
  1040. batch file by putting a semi-colon on the line.  Everything from the          
  1041. semi-colon to the end of the line is ignored.  If the command file is         
  1042. created with a word processor, the program should be used in the              
  1043. non-document mode, to assure that carriage returns are embedded between       
  1044. command lines.  An example of creating a batch file to display the PDS logo   
  1045. image follows.                                                                
  1046.                                                                               
  1047.    At the MS-DOS command level type:                                          
  1048.                                                                               
  1049.    COPY CON TEST.CMD                                                          
  1050.    FILE LOGO.IMG                                                              
  1051.    DISP ZOOM 4                                                                
  1052.    DISP ZOOM 2                                                                
  1053.    DISP                                                                       
  1054.    DISP SUB 2                                                                 
  1055.    EXIT                                                                       
  1056.                                                                               
  1057.    Now run IMDISP and type "BATCH TEST.CMD" at the "COMMAND:" prompt.  Make   
  1058. sure the file "LOGO.IMG" is in your current directory.  The PDS logo should   
  1059. be displayed on the screen in several different sizes.                        
  1060.                                                                               
  1061.                                                                               
  1062. 4.5.2 BRIGHTEN                                                                
  1063.                                                                               
  1064.    The BRIGHTEN command adds a constant value to all pixels in the            
  1065. displayed image.  If no value is specified, the default is 10% of the total   
  1066. range of DN values (i.e., 2 will be added to all pixels in 16-color modes,    
  1067. 26 will be added in 256 color modes).                                         
  1068.                                                                               
  1069.     Examples:                                                                 
  1070.                                                                               
  1071.        BRIGHTEN                                                               
  1072.        BRIGHTEN 50                                                            
  1073.                                                                               
  1074. 4.5.3 BROWSE                                                                  
  1075.                                                                               
  1076.                                                                               
  1077.    The BROWSE command will display all images in a directory one after        
  1078. another.  An optional directory mask can be supplied to display only          
  1079. selected files ("BROWSE *.IMG").  The command creates a list of files to be   
  1080. displayed, then creates and executes a batch command file to display those    
  1081. images.  After each image is displayed, the filename is displayed at the      
  1082. top of the image.  A BROWSE session can be interrupted by pressing            
  1083. control-s, then restarted by pressing control-q TWICE.  A session can be      
  1084. halted by typing any other key during the display.  It can then be            
  1085. restarted (from the beginning) with the command "BROWSE C:BATCH.CMD".  The    
  1086. default file name for the batch file created by the BROWSE command is         
  1087. "C:BATCH.CMD".  This name can be changed using the "SET BROWSE fname"         
  1088. command where fname can consist of a drive letter and filename, which         
  1089. should be terminated  with the extension ".CMD".  It can also be set from     
  1090. DOS or in your AUTOEXEC.BAT file by using the environment variable            
  1091. IMBROWSE.  For example, the DOS command                                       
  1092.                                                                               
  1093.    SET IMBROWSE=D:\TEMP\BROWSE.CMD                                            
  1094.                                                                               
  1095. will make the BROWSE command file in the subdirectory TEMP on drive D:.       
  1096.                                                                               
  1097.    The BROWSE command has one argument and several optional keywords.         
  1098.                                                                               
  1099.    fname         optional file selection mask (must immediately follow the    
  1100.                  command BROWSE).                                             
  1101.                  Examples: *.img, D:\IMAGES\*.IMG, L:*.BRS.                   
  1102.                                                                               
  1103.    SIZe n        allows the display of multiple images on the screen.  For    
  1104.                  example, on a 640x480 VGA display, six 200x200 images can    
  1105.                  be displayed adjacent to each other.                         
  1106.                                                                               
  1107.    SUBsample n   used in conjunction with the SIZE command, to scale each     
  1108.                  image to fit in the SIZE specification.  Same as SUB         
  1109.                  option used with the DISPLAY command.                        
  1110.                                                                               
  1111.    NOLabel       inhibits writing the file name label at the top of each      
  1112.                  image as it is displayed.  The default is that labels are    
  1113.                  enabled.                                                     
  1114.                                                                               
  1115.    DNLow DNHigh  sets the DN range for all images (see SET).                  
  1116.                                                                               
  1117.    PAUse n       pauses display for n seconds when the screen gets full.      
  1118.                                                                               
  1119.    ALL           searches all subdirectories in addition to the current       
  1120.                  directory, looking for files matching the mask.              
  1121.                                                                               
  1122.    AUToset n     sets DNLO and DNHI to n% of the full range, based on the     
  1123.                  image histogram.  The default is 5%.                         
  1124.                                                                               
  1125.    SELect        interactively selects files as they are being displayed      
  1126.                  and writes the filenames out to a "select" file.  The        
  1127.                  default select file is "C:\IMDISP.SEL" and this can be       
  1128.                  changed by using the SET SELECT command.                     
  1129.                                                                               
  1130.    FILe fname    select files to browse from a file instead of using a        
  1131.                  mask.  The file will contain a list of files, and the list   
  1132.                  can have wildcarded names.  The filename can also be the     
  1133.                  IMDISP.SEL file created earlier with the SELect option.      
  1134.                                                                               
  1135.    BUFFERS       browses through all the memory buffers which have been       
  1136.                  created.                                                     
  1137.                                                                               
  1138.    EXAMPLES:                                                                  
  1139.                                                                               
  1140.        BROWSE *.* SIZE 200 SUBSAMPLE 4                                        
  1141.                                                                               
  1142. will display all the files in the current directory, subsampling each by 4    
  1143. and displaying them in a 200 x 200 window.  The command:                      
  1144.                                                                               
  1145.        BROWSE *.IBG SIZE 100 SUB 2 PAUSE ALL                                  
  1146.                                                                               
  1147. when used with the Voyager browse images will display all of the browse       
  1148. images on the screen (including the subdirectories), pausing each time the    
  1149. screen fills up with images.                                                  
  1150.                                                                               
  1151.        BRO *.* SIZE 200 ALL SELECT NOLABEL                                    
  1152.                                                                               
  1153. will allow the selection of individual images and                             
  1154.                                                                               
  1155.        BRO FILE C:\IMDISP.SEL SIZE 200                                        
  1156.                                                                               
  1157. will redisplay the images that you just selected.                             
  1158.                                                                               
  1159.        BROWSE BUFFERS PAUSE                                                   
  1160.                                                                               
  1161. displays the contents of each buffer, pausing in between each display.        
  1162.                                                                               
  1163.        BRO BUFFERS SIZE 100 SUB 4                                             
  1164.                                                                               
  1165. displays a small version of each buffer.                                      
  1166.                                                                               
  1167. *** NOTE ***                                                                  
  1168.                                                                               
  1169.    BROWSE does not distinguish between image and non-image files, and it is   
  1170. up to the user to provide the appropriate directory mask to select ONLY       
  1171. images.  If a message "Image does not have proper label" comes up on the      
  1172. screen during BROWSE, it is probably because a non-image file is in the       
  1173. directory you are browsing.   You can type carriage returns several times     
  1174. to get back to the "COMMAND:" prompt, and the browse will continue.           
  1175.                                                                               
  1176.    If you are using BROWSE on a computer without a hard disk, you will have   
  1177. to use the SET BROWSE command to change the default browse file name to a     
  1178. writable disk drive,  for example: "SET BROWSE A:BROWSE.CMD".  If you are     
  1179. using BROWSE to view files on a CD-ROM disk, be sure to include the drive     
  1180. letter of a writable disk  drive if you specify a BROWSE file name.  The      
  1181. text editor to produce your own custom command files.                         
  1182.                                                                               
  1183.                                                                               
  1184. 4.5.4 CD or CHDIR                                                             
  1185.                                                                               
  1186.                                                                               
  1187.    The CD or CHDIR command is used just as it is at the MS-DOS command        
  1188. level to change the current default directory.                                
  1189.                                                                               
  1190.    The  argument  of the CD command is the  path  name specification of the   
  1191. new default directory.  For example, "CD \IMDISP\IMAGES" would make           
  1192. \IMDISP\IMAGES the current directory if it exists.  To change the current     
  1193. default drive use the "SYSTEM" command ("SYSTEM L:"  for example) or the      
  1194. "FILE" command.  If there is not enough memory available for the system       
  1195. command to be executed an error message is displayed.                         
  1196.                                                                               
  1197.                                                                               
  1198. 4.5.5 COPY                                                                    
  1199.                                                                               
  1200. The COPY command will attempt to copy the image last displayed with the       
  1201. DISPLAY command, the screen or another buffer to a destination buffer.        
  1202. IMDISP will attempt to put the buffer into extended memory.  An FILE option   
  1203. is provided to allow the buffer to be stored on the disk, rather than in      
  1204. memory.                                                                       
  1205.                                                                               
  1206.         COPY  buffer [FILe]                                                   
  1207.         COPY  TO buffer [FILe]                                                
  1208.         COPY  source TO buffer [FILe]                                         
  1209.                                                                               
  1210.       where buffer = A-Z                                                      
  1211.       where source = A-Z or SCReen                                            
  1212.                                                                               
  1213. Examples:                                                                     
  1214.                                                                               
  1215. COPY A                Copies the last displayed image to buffer A             
  1216. COPY A TO B           Copies buffer A to buffer B                             
  1217. COPY A TO B FILE      Copies buffer A to buffer B, buffer B is actually       
  1218.                       stored on disk, instead of in memory                    
  1219. COPY SCREEN TO Z      Copies the entire screen to buffer Z                    
  1220.                                                                               
  1221.                                                                               
  1222. 4.5.6 CURSOR                                                                  
  1223.                                                                               
  1224.                                                                               
  1225.    The CURSOR command is used to select a point in a displayed image for      
  1226. subsequent display commands.  When first invoked, it places a small cursor    
  1227. symbol at the center of the screen.  Depending on the current contents of     
  1228. the screen, the cursor may be hard to see.  Moving it with the arrow keys     
  1229. on the numeric keypad will help you locate it.  If you have a mouse, it       
  1230. will also move the cursor around.                                             
  1231.                                                                               
  1232.    Whenever the cursor is moved, the current line and sample location of      
  1233. the cursor and the DN value of the pixel at that point is printed in the      
  1234. lower right portion of the screen.  The cursor will move 16 pixels in the     
  1235. selected direction unless the movement value is adjusted using the + or       
  1236. keys.                                                                         
  1237.                                                                               
  1238.                           Numeric Keypad Keys                                 
  1239.                     |------|------|-------|-------|                           
  1240.                     |  7   |  8   |  9    | PrtSc |                           
  1241.                     | Home | Up   | PgUp  |       |                           
  1242.                     |------|------|-------|-------|                           
  1243.                     |  4   |  5   |  6    |  -    |                           
  1244.                     | Left |      | Right |       |                           
  1245.                     |------|------|-------|-------|                           
  1246.                     |  1   |  2   |  3    |  +    |                           
  1247.                     | End  | Down | PgDn  |       |                           
  1248.                     |------|------|-------|-------|                           
  1249.                                                                               
  1250.                          Action of Keypad Keys:                               
  1251.                                                                               
  1252.                   7 = Move up and left.                                       
  1253.                   8 = Move up.                                                
  1254.                   9 = Move up and right.                                      
  1255.                   4 = Move left.                                              
  1256.                   5 = Not active.                                             
  1257.                   6 = Move right.                                             
  1258.                   1 = Move down and left.                                     
  1259.                   2 = Move down.                                              
  1260.                   3 = Move down and right.                                    
  1261.                   - = Decrement cursor movement value.                        
  1262.                   + = Increment cursor movement value.                        
  1263.                                                                               
  1264.                                                                               
  1265.                      Table 4-2: IMDISP Cursor Keys                            
  1266.                                                                               
  1267.    Cursor mode is exited by typing a "." (period) or carriage return or by    
  1268. tapping the left button on the mouse.  The cursor position is retained for    
  1269. future use in DISPLAY commands which use the CENTER option.  It is very       
  1270. useful with large images where the entire image may be displayed using the    
  1271. subsample option, then a point selected for subsequent display at full        
  1272. resolution.                                                                   
  1273.                                                                               
  1274.    You can specify the starting position of the cursor with the subcommands   
  1275. DSL (Display Starting Line) and DSS (Display Starting Sample).  Otherwise,    
  1276. the cursor starts off at the position where it was left last.                 
  1277.                                                                               
  1278.    Example: Type "FILE MONTAGE.IMG" followed by "DISP" to display the         
  1279. MONTAGE.IMG file.  Type "CUR" to enter the cursor mode, then move the         
  1280. cursor to the center of the Uranus image in the upper left corner of the      
  1281. image using the up and left arrow keys.  Now type "." to exit cursor mode,    
  1282. then type "DISP ZOOM 4 CENTER" which will display Uranus as a large grainy    
  1283. ball on the screen.                                                           
  1284.                                                                               
  1285.                                                                               
  1286. 4.5.7 DARKEN                                                                  
  1287.                                                                               
  1288.    The DARKEN command subtracts a constant value from all pixels in the       
  1289. displayed image.  If no value is specified, the default is 10% of the total   
  1290. range of DN values (i.e., 2 will be subtracted from all pixels in 16-color    
  1291. modes, 26 will be subtracted in 256 color modes).                             
  1292.                                                                               
  1293.    Examples:                                                                  
  1294.                                                                               
  1295.    DARKEN                                                                     
  1296.    DAR 100                                                                    
  1297.                                                                               
  1298.                                                                               
  1299. 4.5.8 DIR                                                                     
  1300.                                                                               
  1301.                                                                               
  1302.    The DIR command is used just as the MS-DOS dir command.  Its argument is   
  1303. passed to MS-DOS for execution.  At the end of the directory listing the      
  1304. screen will display "Type carriage return to continue:" which will return     
  1305. to the IMDISP command mode.  If there is not enough memory available for      
  1306. the system command to be executed an error message is displayed.              
  1307.                                                                               
  1308.                                                                               
  1309. 4.5.9 DISPLAY                                                                 
  1310.                                                                               
  1311.                                                                               
  1312.    The DISPLAY command reads an image file and displays it on the the         
  1313. screen.  If the image is larger than the display screen, the default mode     
  1314. is to display as much of the upper left portion of the image as will fit on   
  1315. the screen.  The SUBSAMPLE keyword can be used to select every 'n' lines      
  1316. and samples so that representations of very large images may be displayed.    
  1317. The ZOOM keyword can be used to enlarge a portion of an image on the          
  1318. display screen.  Keywords can be specified to begin displaying at any line    
  1319. and sample in the image with the SL (starting line) and SS (starting          
  1320. sample).  If only a limited number of lines and samples are to be displayed   
  1321. the NL (number of lines) and NS (number of samples) keywords can be used.     
  1322. The UP, DOWN, LEFT and RIGHT keywords can be used to display different        
  1323. portions of the image, relative to the currently displayed portion.  The      
  1324. display can also placed at any point on the screen using the DSL (display     
  1325. starting line) and DSS (display starting sample) keywords.  The FLIP          
  1326. keyword displays the image from the bottom of the screen to the top, rather   
  1327. than the other way around.                                                    
  1328.                                                                               
  1329.    DISPLAY takes the following keywords :                                     
  1330.                                                                               
  1331.    buffer       displays the image in the named memory buffer                 
  1332.                                                                               
  1333.    SUBsample n  a positive integral subsampling factor for displaying         
  1334.                 images larger than the size of the screen.  SUB=2 would       
  1335.                 display an image at half the resolution.                      
  1336.                                                                               
  1337.    If the image lines and samples look like this:                             
  1338.                                                                               
  1339.                  sample values                                                
  1340.                                                                               
  1341.         line 1      1 2 3 4 5                                                 
  1342.         line 2      6 7 8 9 10                                                
  1343.         line 3      11 12 13 14 15                                            
  1344.                                                                               
  1345.    Then the command DISP SUB 2 would produce:                                 
  1346.                                                                               
  1347.                  sample values                                                
  1348.                                                                               
  1349.         line 1      1 3 5                                                     
  1350.         line 2      11 13 15                                                  
  1351.                                                                               
  1352.    ZOOM n       a positive integral zoom factor for looking at part of an     
  1353.                 image close up.  The zoom command replicates pixels by the    
  1354.                 integer value specified.  If the image lines and samples      
  1355.                 look like this:                                               
  1356.                                                                               
  1357.                  sample values                                                
  1358.                                                                               
  1359.         line 1      1 2 3                                                     
  1360.         line 2      4 5 6                                                     
  1361.         line 3      7 8 9                                                     
  1362.                                                                               
  1363.    Then the command ZOOM 2 would produce the following:                       
  1364.                                                                               
  1365.                  sample values                                                
  1366.                                                                               
  1367.         line 1      1 1 2 2 3 3                                               
  1368.         line 2      1 1 2 2 3 3                                               
  1369.         line 3      4 4 5 5 6 6                                               
  1370.         line 4      4 4 5 5 6 6                                               
  1371.         line 5      7 7 8 8 9 9                                               
  1372.         line 6      7 7 8 8 9 9                                               
  1373.                                                                               
  1374.                                                                               
  1375.    CENTER       center the display around current cursor position.   This     
  1376.                 command is very useful when displaying large images or when   
  1377.                 zooming in on selected areas.  Should be used after using     
  1378.                 the CURSOR command.                                           
  1379.                                                                               
  1380.    NL n                                                                       
  1381.    NS n         number of lines or samples from the image file to display     
  1382.                                                                               
  1383.    SL n                                                                       
  1384.    SS n         starting line or sample within the image file to display      
  1385.                                                                               
  1386.    UP n                                                                       
  1387.    DOWN n       adjusts the starting line up or down from the previous        
  1388.                 value, thereby moving  the display window up or down in the   
  1389.                 image.  The default amount to move up or down is the size     
  1390.                 of the display.                                               
  1391.                                                                               
  1392.    LEFT n                                                                     
  1393.    RIGHT n      adjusts the starting sample left or right from the previous   
  1394.                 value, thereby moving the display window left or right in     
  1395.                 the image                                                     
  1396.                                                                               
  1397.    DSL n                                                                      
  1398.    DSS n        start the image display at the specified line and sample on   
  1399.                 the display screen.                                           
  1400.                                                                               
  1401.    FLIP         flips the image top to bottom, so the image is displayed      
  1402.                 from the bottom of the screen to the top.                     
  1403.                                                                               
  1404.    NOPrompt     displays the image without display the command line prompt    
  1405.                 (COMMAND:) at the bottom of the screen.  This is to           
  1406.                 accommodate screen captures of IMDISP displays.               
  1407.                                                                               
  1408.    AUToset n    sets DNLO and DNHI to n% of the full range, based on the      
  1409.                 histogram.  The default is 5%.                                
  1410.                                                                               
  1411.    NOMemory     tells IMDISP not to attempt to load the image into extended   
  1412.                 memory as it displays the image.                              
  1413.                                                                               
  1414.    SOUrce       used to display the source file of a browse image.  The       
  1415.                 source file is specified with the SOURCE_FILE_NAME and        
  1416.                 SAMPLING_FACTOR keywords in the label.  The source file is    
  1417.                 centered on the current cursor position in the browse file.   
  1418.                 Does not work with Voyager or Viking compressed images.       
  1419.                                                                               
  1420.    Examples: The user wants to display an entire Voyager image (800 x 800)    
  1421. on the display screen then display a portion of the image at full             
  1422. resolution.  Type "FILE MIRANDA1.LBL", then "DISP SUB 2" to display the       
  1423. entire image at half resolution, Use the CURSOR command to move the cursor    
  1424. to the center of an area of interest.  Exit the cursor mode by typing ".",    
  1425. then type "DISP CENT" to display the selected portion of the image at full    
  1426. resolution.                                                                   
  1427.                                                                               
  1428.    The user wishes to place 2 images which are each 800 lines by 800          
  1429. samples on the screen next to each other.  The first file is opened with      
  1430. "FILE IMAGE1.IMG".  The "DISPLAY SUB 4" command is given to display every     
  1431. 4th line and sample of the image to create a 200 x 200 display.  Next the     
  1432. "FILE IMAGE2.IMG" command is given.  Now a "DISPLAY SUB 4 DSS 201" is given   
  1433. to place the second image on the screen starting at display sample position   
  1434. 201, next to the first image.                                                 
  1435.                                                                               
  1436.                                                                               
  1437.     Examples:                                                                 
  1438.                                                                               
  1439.     DISP SUB 2                                                                
  1440.     DISP SUB 3 DSS 200                                                        
  1441.     DISP SUB 4 DSL 300                                                        
  1442.     DISP CEN ZOOM 2              (Use CUR first to select a center)           
  1443.     DISP A                       Displays buffer A                            
  1444.     DISP A SUB 2                 Displays buffer A, subsampled twice          
  1445.     DISP A CEN ZOOM 3            Zooms in on the center of buffer A           
  1446.                                                                               
  1447.                                                                               
  1448. 4.5.10 ENHANCE                                                                
  1449.                                                                               
  1450.                                                                               
  1451.    The command ENHANCE applies a number of image processing filters to the    
  1452. image.  It can either be applied to the entire image (from the input file)    
  1453. or simply to the displayed portion of the image.                              
  1454.                                                                               
  1455.    ENHANCE takes the following subcommands:                                   
  1456.                                                                               
  1457.      SCReen         applies the filter to the entire screen.  If this         
  1458.                     option is not selected, then the filter will be applied   
  1459.                     to the image last displayed with the DISPLAY command.     
  1460.                                                                               
  1461.      BAAlke         applies an enhancement filter developed by Ron Baalke.    
  1462.                                                                               
  1463.      CONvolution n  applies a convolution filter to the image which has the   
  1464.                     effect of detecting the edges.  A 3x3 mask is used.       
  1465.                     There are two variations of this filter used (n = 0 or    
  1466.                     1).  Integer arithmetic is used to speed up the           
  1467.                     process.  The following weighted mask is used:            
  1468.                                                                               
  1469.                                -1  -1  -1                                     
  1470.                                -1   8  -1                                     
  1471.                                -1  -1  -1                                     
  1472.                                                                               
  1473.      EDGe n         applies an edge enhancement filter to the image using a   
  1474.                     3x3 mask.  There are four variations of this filter (n    
  1475.                     = 0, 1, 2, 3).  Integer arithmetic is used to speed up    
  1476.                     the process.                                              
  1477.                                                                               
  1478.      HIGh n         applies a high pass filter to the image, which has the    
  1479.                     effect of removing slowly varying changes in the image,   
  1480.                     and leaving behind rapid changes.                         
  1481.                                                                               
  1482.      HIStogram      applies a histogram equalization filter to the image,     
  1483.                     which has the effect of maximizing the contrast across    
  1484.                     the whole image.                                          
  1485.                                                                               
  1486.      LOG  n         applies a logarithmic filter to the image which has the   
  1487.                     effect of enhancing the contrast in the image.  Useful    
  1488.                     on dark images or on images like stars and galaxies.      
  1489.                     The parameter that goes with this one is a little         
  1490.                     different than the other filters, in that you specify a   
  1491.                     factor (default=40) which is multiplied with the log of   
  1492.                     the pixel value.  Examples:                               
  1493.                                                                               
  1494.      MEAn n         applies a mean filter to the image which has the effect   
  1495.                     of smoothing out the image.  There are three variations   
  1496.                     of this filter (n = 0, 1, 2).  A 3x3 (n=0), 5x5 (n=1)     
  1497.                     or 7x7 (n=2) mask is used where the middle pixel is       
  1498.                     replaced by the average of the other pixels in the        
  1499.                     mask.  Integer arithmetic is used to speed up the         
  1500.                     process.                                                  
  1501.                                                                               
  1502.      MEDian         applies a median filter to the image which has the        
  1503.                     effect of smoothing out the image.  A 3x3 mask is used    
  1504.                     where the middle pixel is replaced by the middle of the   
  1505.                     nine pixels after they have been sorted.  The sort used   
  1506.                     is a simple bubble sort which is terminated halfway       
  1507.                     through the sort process since the median value will be   
  1508.                     found by then.                                            
  1509.                                                                               
  1510.      POWer n        modifies the pixels of the image by the following         
  1511.                     equation:                                                 
  1512.                                                                               
  1513.                        newDN = numDN * (oldDN/numDN) ^ n                      
  1514.                                                                               
  1515.                     where n is a floating point number.  The default value    
  1516.                     is 2.0.  Values less than 1.0 tend to brighten the        
  1517.                     image, while values greater than 1.0 tend to darken it.   
  1518.                                                                               
  1519.      STAir n        groups pixels together with the net result of smoothing   
  1520.                     the image.  The default step increment is 8               
  1521.                                                                               
  1522.      SMEar          applies a filter which averages the image in the          
  1523.                     vertical direction.  The result is to "smear" the         
  1524.                     images down the screen.                                   
  1525.                                                                               
  1526.      UNSharp        applies an unsharp mask to the image, which has the       
  1527.                     effect of enhancing edges in the image.  It is the        
  1528.                     equivalent of performing a merge with 3 times the         
  1529.                     original image minus 2 times the image after it has       
  1530.                     been blurred with a 5x5 mean filter.                      
  1531.                                                                               
  1532.                                                                               
  1533.      Examples:                                                                
  1534.                                                                               
  1535.         ENH MEAN                                                              
  1536.         ENH EDGE                                                              
  1537.         ENHANCE EDGE 2                                                        
  1538.         ENHANCE BAALKE SCREEN                                                 
  1539.         ENH CON 1                                                             
  1540.         ENH SMEAR SCR                                                         
  1541.         ENH POWER .1   (similar to ENH LOG)                                   
  1542.         ENH STAIR 2    (creates a binary 2-color image)                       
  1543.                                                                               
  1544.                                                                               
  1545. 4.5.11 ERASE                                                                  
  1546.                                                                               
  1547.                                                                               
  1548.    The command ERASE causes the screen to be erased by setting all of the     
  1549. pixels to 0, which may not necessarily be black depending on the palette      
  1550. setting.  If the REFRESH option is selected, then only the refresh buffer     
  1551. will be erased.  Memory buffers (denoted by letters A through Z) can also     
  1552. be erased.                                                                    
  1553.                                                                               
  1554.     Examples:                                                                 
  1555.                                                                               
  1556.        ERA            erases the screen                                       
  1557.        ERA REFRESH    erases the refresh buffer                               
  1558.        ERA A          erases the memory buffer named A                        
  1559.                                                                               
  1560.                                                                               
  1561. 4.5.12 EXIT                                                                   
  1562.                                                                               
  1563.                                                                               
  1564.    The EXIT command exits IMDISP and returns the user to the MS-DOS           
  1565. operating system.  The contents of the image display and refresh buffer are   
  1566. discarded.  The single subcommand NOClear will leave the computer display     
  1567. in graphics mode, and will not clear the screen.  Same as QUIT.               
  1568.                                                                               
  1569.                                                                               
  1570. 4.5.13 FILE                                                                   
  1571.                                                                               
  1572.                                                                               
  1573.    FILE takes just a value which is the file name.  The specified file will   
  1574. be opened, or an error message issued if the file cannot be opened.  The      
  1575. capability to directly address any sector on the CD-ROM disk by providing     
  1576. its physical address (minute, second and sector number) is also available     
  1577. to users of the Microsoft Extensions software.  There is one keyword,         
  1578. NOMEMORY.  If not given, the FILE command will attempt to put the image       
  1579. directly into extended memory (where the DISPLAY command will find it).  If   
  1580. specified, or if the image doesn't fit into extended memory, the DISPLAY      
  1581. command will read the image from disk.  FILE can now display GIF-format       
  1582. images, as well.  It does this automatically if the filename extension is     
  1583. .GIF.                                                                         
  1584.                                                                               
  1585.    If the FILE command is specified without a filename, or with a filename    
  1586. mask which contains a wildcard, the program will display a list of file       
  1587. names in the current directory.  Each file name is preceded by a number.      
  1588. Typing the number associated with a file name will select that file for       
  1589. processing.  File names that actually represent lower level directories are   
  1590. indicated with a <d> symbol after the name.  Directories can be traversed     
  1591. downward by selecting the number associated with a directory name.  Upward    
  1592. traversal is by selecting the item identified as PARENT DIR.  This will       
  1593. move upward in the directory hierarchy.                                       
  1594.                                                                               
  1595.    The prompt mode clears the screen and displays a menu of files (matching   
  1596. the wildcard mask, if one was used) and commands.  These commands allows      
  1597. specification of the default drive, a file "mask" to use in selecting file    
  1598. names for display and options for moving through the list of files when the   
  1599. current directory contain more than 30 files.  The top line of the display    
  1600. also indicates how many files are in the current directory.  After exiting    
  1601. the FILE prompt mode, the previous contents of the display screen can be      
  1602. recovered by typing "REFRESH".                                                
  1603.                                                                               
  1604.    The FILE prompt mode subcommands:                                          
  1605.                                                                               
  1606.      D    select default disk drive                                           
  1607.      M    specify a file selection mask to use in displaying files on the     
  1608.           screen.                                                             
  1609.      N    display the next set of file names on the screen if there are       
  1610.           more files in the current directory than can be displayed on one    
  1611.           screen.                                                             
  1612.      P    display the previous set of file names.                             
  1613.      Q    quit the file selection mode and return to IMDISP command mode.     
  1614.                                                                               
  1615.    The N, P and Q commands are executed immediately.  If the D or M           
  1616. commands are selected, the user is prompted to enter a drive letter or file   
  1617. mask.                                                                         
  1618.                                                                               
  1619.    If the file selected by the "FILE filename" or FILE prompt mode has a      
  1620. valid label, either PDS or VICAR2, then the number of lines and samples and   
  1621. the pixel size will be displayed.  If the file is unlabeled then the          
  1622. program will prompt for the values to use for the number of lines and         
  1623. samples, the number of bits per pixel, and the number of header bytes.  PDS   
  1624. images with detached labels can also be displayed.  The specified file        
  1625. remains the current file until a new FILE command is given.  The FILE         
  1626. command resets the SET DNLO and SET DNHI values to the minimum and maximum    
  1627. for the pixel size (normally 0 and 255).  If a specified filename is not      
  1628. found in the current directory then an error message is displayed.            
  1629.                                                                               
  1630.    If the unlabeled image has a regular format, that is a uniform structure   
  1631. of repeating lines and samples, the user can specify this information when    
  1632. prompted by the program.  For example, an image named ASTERIA.DAT with one    
  1633. 1422 byte header block followed by an image composed of 370 lines by 450      
  1634. samples of 8 bit pixels would be processed as follows:                        
  1635.                                                                               
  1636.    At the COMMAND: prompt type "FILE ASTERIA.DAT".  The program will          
  1637. display the message:                                                          
  1638.                                                                               
  1639.   Input file does not have a proper label.                                    
  1640.   Input number of lines: 370           enter the value 370                    
  1641.   Input number of samples: 450         enter the value 450                    
  1642.   Input size of each sample: 8         enter the value 8 (bits)               
  1643.   Input size of header label: 1422     enter 1422 (bytes) for the size of     
  1644.                                        the foreign label block.               
  1645.                                                                               
  1646.    If the size of each sample is greater than 8 bits, the program will ask    
  1647. whether to swap the byte ordering or not.  16-bit integers written on Unix    
  1648. or MS-DOS machines generally do not need to be swapped, while 16-bit          
  1649. integers written on VAX/VMS machines generally do.                            
  1650.                                                                               
  1651.    The physical address of a data block on the CD-ROM can also be specified   
  1652. using the syntax 'FILE "CD:mm:ss:bb"', where mm is the minute, ss the         
  1653. second, and bb the sector block number of the beginning of the desired data   
  1654. area.  The CD:mm:ss:nn must be in double quotes and the CD must be            
  1655. capitalized!  This mechanism can be used to access files on non-High Sierra   
  1656. format disks.  This will only work on systems using the Microsoft             
  1657. Extensions software.                                                          
  1658.                                                                               
  1659.                                                                               
  1660. 4.5.14 HELP                                                                   
  1661.                                                                               
  1662.                                                                               
  1663.    HELP displays the online help message.  If followed by the name of a       
  1664. valid command the message for that command is displayed.  HELP is not         
  1665. provided for MS-DOS commands (DIR, CHDIR, CD and TYPE).                       
  1666.                                                                               
  1667.                                                                               
  1668. 4.5.15 HISTOGRAM                                                              
  1669.                                                                               
  1670.                                                                               
  1671.    The HISTOGRAM command produces a plot showing the number of pixel values   
  1672. in the image at each DN level.  The range of DN values is displayed on the    
  1673. x-axis and the number of occurrences of a specific DN value on the y-axis     
  1674. (See Figure 4-1).                                                             
  1675.                                                                               
  1676.    The HISTOGRAM command reads through the image, calculates the histogram,   
  1677. and then displays the plot on the screen.  The histogram is scaled so that    
  1678. the third highest histogram value is used as the maximum.  It is              
  1679. recommended that the SUBSAMPLE or other subsetting keywords be used to        
  1680. speed up histogram calculation, which can be quite slow for large images      
  1681. and for images stored on CD-ROM.  Histogram plots are displayed on top of     
  1682. any image currently displayed on the screen, so the user may wish to use      
  1683. the ERASE command to clear the screen prior to using HISTO.  After the        
  1684. histogram is displayed, the image can be restored using the REFRESH           
  1685. command.                                                                      
  1686.                                                                               
  1687.                                                                               
  1688.             27582 |      .                                                    
  1689.                   |      ..                                                   
  1690.                   |     ....                                                  
  1691.            COUNT  |     .....                                                 
  1692.                   |    .......                                                
  1693.                   |    .........                                              
  1694.                   |   ............                                            
  1695.                   |  ...............                                          
  1696.                    --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                          
  1697.                    0   64   128   192   256                                   
  1698.                             DN value                                          
  1699.                                                                               
  1700.                    Figure 4-1: Sample Image Histogram                         
  1701.                                                                               
  1702.                                                                               
  1703.    By evaluating the histogram, the user can determine the optimum settings   
  1704. for the SET (DNLO and DNHI) command to produce a useful display.  In the      
  1705. example above, the image data are clustered between DN values 32 and 144.     
  1706. Using the default settings of the EGA display mode the colors assigned to     
  1707. the 2 lowest color values and the 7 highest values (representing DN values    
  1708. from 0 to 31 and from 144 to 255) would not be used since the image           
  1709. contains no pixels with these values.                                         
  1710.                                                                               
  1711.    By using the "SET DNLO 32 DNHI 144" command the 16 display levels          
  1712. available on the EGA display would be assigned to values between 32 and 144   
  1713. rather than distributed evenly from 0 to 255, and all 16 colors would be      
  1714. used in the display.                                                          
  1715.                                                                               
  1716.    HISTOGRAM takes the following keywords and arguments:                      
  1717.                                                                               
  1718.     SUBsample n  a integral subsample factor.  For speeding up HISTOGRAM,     
  1719.                  use of "SUBSAMPLE 4" is recommended                          
  1720.                                                                               
  1721.     buffer       displays the histogram of the image in the named memory      
  1722.                  buffer                                                       
  1723.                                                                               
  1724.     NL n                                                                      
  1725.     NS n         number of lines and samples from image                       
  1726.                                                                               
  1727.     SL n                                                                      
  1728.     SS n         starting line and sample in image                            
  1729.                                                                               
  1730.     CENT         perform the histogram on only the displayed portion of the   
  1731.                  image.                                                       
  1732.                                                                               
  1733.    Two special keywords can be used with Voyager or Viking images on the      
  1734. PDS CD-ROM disks.  These will extract histogram values stored with the        
  1735. image on the CD-ROM disk and reduce the time required for the histogram to    
  1736. be generated from more than 1 minute to about 3 seconds.  Note that these     
  1737. commands will not work with Voyager image files in the                        
  1738. \PLANET\JUPITER\ATMOS directory, or with versions of system software          
  1739. written before April 1987.                                                    
  1740.                                                                               
  1741.     VOY   use histogram from Voyager CD-ROM engineering data                  
  1742.     VIK   use histogram from Viking CD-ROM engineering data                   
  1743.                                                                               
  1744.                                                                               
  1745. 4.5.16 LABEL                                                                  
  1746.                                                                               
  1747.                                                                               
  1748.    The LABEL command prints the labels for the currently selected image       
  1749. file on the screen.  It pauses after each screen full of data, and waits      
  1750. for you to press a key before displaying the next screen of data.  You can    
  1751. terminate the listing by pressing the letter 'Q' to quit and return to        
  1752. IMDISP.                                                                       
  1753.                                                                               
  1754.                                                                               
  1755. 4.5.17 LOG                                                                    
  1756.                                                                               
  1757.                                                                               
  1758.    The LOG command controls logging commands to a text file as they're        
  1759. entered.  The resulting file can be used as a batch file, to repeat the       
  1760. command sequence, or as a record of what operations have been performed.      
  1761. The file is automatically flushed and closed when you exit IMDISP.            
  1762.                                                                               
  1763.    The LOG command takes the following keywords and arguments:                
  1764.                                                                               
  1765.     ON             opens a log file called IMDISP.LOG.  Commands will be      
  1766.                    copied into this file until it is either closed or you     
  1767.                    exit IMDISP.                                               
  1768.                                                                               
  1769.     FILe  fname    opens a log file called fname (defaults to IMDISP.LOG).    
  1770.                                                                               
  1771.     CLOse                                                                     
  1772.     OFF            closes the current log file.                               
  1773.                                                                               
  1774. 4.5.18 MASK                                                                   
  1775.                                                                               
  1776.    The MASK command is used to mask out pixels on the low or high end of      
  1777. the color palette.  It is particularly userful when merging images            
  1778. together.  It sets all the pixels with a DN value above or below a            
  1779. specified value to a default.                                                 
  1780.                                                                               
  1781.    The MASK command takes the following keywords and arguments:               
  1782.                                                                               
  1783.     LO n           sets all pixels with a DN value of n or less to the        
  1784.                    default DN value of 0.                                     
  1785.                                                                               
  1786.     HI n           sets all pixels with a DN value of n or greater to the     
  1787.                    default DN value of 255.                                   
  1788.                                                                               
  1789.     WITH n         overrides the default values for LO and HI, and sets the   
  1790.                    pixels to the DN value n.                                  
  1791.                                                                               
  1792. Examples:                                                                     
  1793.                                                                               
  1794. MASK LO 20             Sets the DN values for all pixels with DN values of    
  1795.                        20 or less to 0.                                       
  1796.                                                                               
  1797. MASK LO 20 WITH 255    Sets the DN values for all pixels with DN values of    
  1798.                        20 or less to 255.                                     
  1799.                                                                               
  1800. MASK HI 200            Sets the DN values for all pixels with DN values of    
  1801.                        200 or more to 255.                                    
  1802.                                                                               
  1803. MASK HI 200 WITH 0     Sets the DN values for all pixels with DN values of    
  1804.                        200 or more to 0.                                      
  1805.                                                                               
  1806.                                                                               
  1807. 4.5.19 MENU                                                                   
  1808.                                                                               
  1809.                                                                               
  1810.    The MENU command reads a file containing a list of file names and places   
  1811. the user in the MENU mode, where files from this list can be selected for     
  1812. display.  The MENU mode is similar to the FILE mode, except that the list     
  1813. of files presented is that provided in the menu file, rather than from a      
  1814. selected directory.                                                           
  1815.                                                                               
  1816.    The MENU mode can be invoked by typing "MENU filename.MNU" at the          
  1817. COMMAND: prompt.  It can also be invoked on program startup by typing         
  1818. "IMDISP filename.MNU" to initiate the program.  The menu file must use the    
  1819. ".MNU" extension to startup IMDISP in MENU mode.                              
  1820.                                                                               
  1821.    Subcommands of the MENU mode are as follows:                               
  1822.                                                                               
  1823.    #         - Enter the number corresponding to a desired                    
  1824.                file name to select the file.                                  
  1825.                                                                               
  1826.    P)revious - display the previous screen of file names                      
  1827.    N)ext     - display the next screen of file names                          
  1828.    Q)uit     - quit or exit from MENU mode                                    
  1829.                                                                               
  1830.    After selecting and displaying an image, the user can return to the        
  1831. current menu by typing "MENU" at the COMMAND: prompt.                         
  1832.                                                                               
  1833.    A menu file can take either of two formats.  The preferred format is a     
  1834. PDS labelled table file containing file names.  A sample file is shown        
  1835. below:                                                                        
  1836.                                                                               
  1837. NJPL1I00PDS100000000      = SFDU_LABEL                                        
  1838. FILE_TYPE                 = TABLE                                             
  1839. RECORD_FORMAT             = STREAM                                            
  1840. OBJECT                    = FILE_NAME                                         
  1841.  TYPE                     = LITERAL                                           
  1842.  LENGTH                   = 80                                                
  1843. ENDOBJECT                                                                     
  1844. NOTE                      = "Sample MENU file for IMDISP"                     
  1845. END                                                                           
  1846. L:\OCEAN\SCBMEAN.IMG                                                          
  1847. L:\OCEAN\WCMEAN.IMG                                                           
  1848. L:\PLDS\TMCH01.DAT                                                            
  1849. L:\PLDS\DEM.DAT                                                               
  1850. L:\PLANET\SATURN\ATMOS\C3497355.IMG                                           
  1851. <END OF FILE>                                                                 
  1852.                                                                               
  1853.    A second abbreviated form may also be used, where only the filenames are   
  1854. specified in the ".MNU" file.  In this case the file would only contain the   
  1855. filenames shown after the END statement in the example above.                 
  1856.                                                                               
  1857.                                                                               
  1858. 4.5.20 MERGE                                                                  
  1859.                                                                               
  1860.                                                                               
  1861. The MERGE command will merge buffers, images or the screen together.  A       
  1862. scaling option can be provided to control the amount of merging.  If the TO   
  1863. option is not used then the result will be displayed on the screen by         
  1864. default.  The result can also be written to a buffer.                         
  1865.                                                                               
  1866.         MERGE buffer                                                          
  1867.         MERGE source1 [scale1] WITH source2 [scale2] [TO buffer] [FILE]       
  1868.                                                                               
  1869. Examples:                                                                     
  1870.                                                                               
  1871. MERGE A                   Merge the last displayed image with buffer A and    
  1872.                           display the result back on the screen               
  1873.                                                                               
  1874. MERGE A WITH B            Merge buffer A with buffer B and display the        
  1875.                           result on the screen.  Since no scaling parameter   
  1876.                           are specified IMDISP will default to 50% of A and   
  1877.                           50% of B.                                           
  1878.                                                                               
  1879. MERGE A WITH B TO C       Merge buffer A with buffer B and store the result   
  1880.                           into buffer C                                       
  1881.                                                                               
  1882. MERGE A WITH B -1         Subtract buffer A from buffer B                     
  1883.                                                                               
  1884. MERGE A .75               Merge 25% of the last displayed image with 75% of   
  1885.                           buffer A, display the result on the screen.         
  1886.                                                                               
  1887. MERGE A .75 with B .8     Merge 75% of buffer B with 80% of buffer B,         
  1888.                           display result on the screen                        
  1889.                                                                               
  1890. MERGE B WITH SCREEN       Merge buffer B with the screen                      
  1891.                                                                               
  1892. MERGE A 3 WITH B -2 TO C FILE    Subtract twice buffer B from 3 times A,      
  1893.                                  store the result in buffer.                  
  1894.                                                                               
  1895.                                                                               
  1896. 4.5.21 OVERLAY                                                                
  1897.                                                                               
  1898.                                                                               
  1899.    The OVERLAY command draws a lat/lon overlay grid on the displayed image.   
  1900. It is intended only for use with the Ocean Data System, West Coast Time       
  1901. Series CD-ROM in this program version.                                        
  1902.                                                                               
  1903.    The OVERLAY command has the following arguments:                           
  1904.                                                                               
  1905.    MAXLAT   Latitude of top of image.                                         
  1906.    MINLAT   Latitude of bottom of image.                                      
  1907.    MAXLON   Longitude of left side of image.                                  
  1908.    MINLON   Longitude of right side of image.                                 
  1909.                                                                               
  1910.    LEGend   Draw a color scale with the overlay.                              
  1911.                                                                               
  1912.                                                                               
  1913. 4.5.22 PALETTE                                                                
  1914.                                                                               
  1915.                                                                               
  1916.    The PALETTE command is used for changing the colors assigned to            
  1917. displayable color values.  This is done by modifying an internal color        
  1918. table which assigns intensity values for red, green and blue to a color       
  1919. value, The EGA provides 4 intensity values for each of 3 colors, so that 64   
  1920. different colors can be created.  However, the EGA pixels are only 4-bits     
  1921. each so only 16 color values can be used simultaneously.                      
  1922.                                                                               
  1923.    The palette can be modified using the EDIT command and saved and loaded    
  1924. from a disk file.  The edit mode is invoked by typing PALETTE EDIT.  With     
  1925. the EGA display, a bar containing 16 colors or shades will be displayed on    
  1926. the bottom of the screen.  A small square will appear in the middle of the    
  1927. center color box.  This indicates that this color value is currently          
  1928. selected for editing.  To select another color value for editing, move the    
  1929. small square to the appropriate color using either the "4" (left arrow) and   
  1930. "6" (right arrow) keys on the numeric keypad or the mouse.  The "7" (Home)    
  1931. and "1" (End) keys move to the beginning and end of the palette.  Pressing    
  1932. the "Ctrl" key with either the "4" or "6" keys will jump the small square     
  1933. left or right by 8 color bars.                                                
  1934.                                                                               
  1935.    The color of the current color box is changed with the "R", "G", and "B"   
  1936. keys (for red, green, and blue).  Upper case letters increase the amount of   
  1937. the primary color, and lower case keys decrease the amount of the color.      
  1938. The "8" (up arrow) and "2" (down arrow) keys increase and decrease,           
  1939. respectively, the amount of red, green, and blue simultaneously.  The left    
  1940. button on the mouse does the same thing.  Other commands in the palette       
  1941. edit mode are the "S" and "s" commands, which will shift all colors one       
  1942. value to the right or left, and the "x" command, which will exchange color    
  1943. values (the color setting for color 0 becomes the setting for color 15,       
  1944. while 15 replaces 0, the color setting for color 1 becomes the setting for    
  1945. 14, while 14 replaces 1, etc.).  The up and down arrow keys can also be       
  1946. used to cycle through the colors available in a given display mode one at a   
  1947. time.  Type the "." key or carriage return to exit the edit mode.             
  1948.                                                                               
  1949.    PALETTE takes the following keywords and arguments:                        
  1950.                                                                               
  1951.     EDIT n         to interactively adjust an n-color palette.  See edit      
  1952.                    description (above) for details                            
  1953.                                                                               
  1954.     PSEUDOCOLOR n  PS = 0 for default EGA palette,                            
  1955.                    PS = 1 for gray scale palette,                             
  1956.                    PS = 2 or 3 for pseudo color palettes (16 levels)          
  1957.                    PS = 4, ..., 9 for pseudo color palettes (256 levels)      
  1958.                                                                               
  1959.     SAVE filename  saves the specified palette on disk                        
  1960.                                                                               
  1961.     LOAD filename  loads the specified palette from disk, if no filename is   
  1962.                    specified, then list of files is displayed.  See FIL       
  1963.                    command for more details.                                  
  1964.                                                                               
  1965.     DIS            displays the current palette on the screen                 
  1966.                                                                               
  1967.     ERA            erases the current palette from the screen                 
  1968.                                                                               
  1969.     CYC  n         cycles the color palette                                   
  1970.                                                                               
  1971.                    CYC = 0  "blinks" the palette                              
  1972.                    CYC = 1  blinks four times                                 
  1973.                    CYC = 2  rotates the palette for spectacular results       
  1974.                    CYC = 3  rotates and feeds in random colors                
  1975.                    CYC = 4  randomizes the palette                            
  1976.                    CYC = 5  double rotates the palette                        
  1977.                    CYC = 6  random swaps of the palette                       
  1978.                                                                               
  1979.                    Any key will stop the palette cycling.  A 'S' or 's' key   
  1980.                    will save the palette which is currently being             
  1981.                    displayed, any other key will restore the palette to its   
  1982.                    original colors.                                           
  1983.                                                                               
  1984.                    CYCLE itself has two keywords.                             
  1985.                                                                               
  1986.                    FASt     sets the delay between changes to .1 second       
  1987.                             (the default is .3).  Works best on machines      
  1988.                             with fast video, where flicker is minimized.      
  1989.                                                                               
  1990.                    TIMe n   runs the PAL CYCLE command for n seconds          
  1991.                             (useful in batch files).                          
  1992.                                                                               
  1993.                                                                               
  1994.    The default palette file for LOAD or SAVE operations is IMDISP.PAL.  The   
  1995. format of the default color palette when stored in a palette file is as       
  1996. shown below:                                                                  
  1997.                                                                               
  1998. NJPL1I00PDS000000784     = PDS_SFDU_LABEL                                     
  1999. FILE_TYPE                = TABLE                                              
  2000. RECORD_TYPE              = STREAM                                             
  2001. FILE_RECORDS             = 28                                                 
  2002. TABLE_ROWS               = 16                                                 
  2003. ROW_COLUMNS              =  4                                                 
  2004. COLUMN_NAME              = (COLOR_NUMBER,                                     
  2005.                             RED_VALUE,                                        
  2006.                             GREEN_VALUE,                                      
  2007.                             BLUE_VALUE)                                       
  2008. COLUMN_TYPE              = (INTEGER,INTEGER,INTEGER,INTEGER)                  
  2009. END                                                                           
  2010.   0   0   0   0                                                               
  2011.   1  64   0   0                                                               
  2012.   2 128   0   0                                                               
  2013.   3 192   0   0                                                               
  2014.   4 192  64   0                                                               
  2015.   5 192 128   0                                                               
  2016.   6 192 192   0                                                               
  2017.   7 128 192   0                                                               
  2018.   8   0 192   0                                                               
  2019.   9   0 192 128                                                               
  2020.  10   0 128 128                                                               
  2021.  11   0 128 192                                                               
  2022.  12   0   0 192                                                               
  2023.  13 128   0 192                                                               
  2024.  14 192   0 192                                                               
  2025.  15 192 192 192                                                               
  2026.                                                                               
  2027.    The first column of the palette table is the color value number for the    
  2028. display, and columns 2, 3 and 4 represent the intensity of the red, green     
  2029. and blue (respectively) primary colors on a scale of 0 to 255.  With the      
  2030. EGA display these values are: 0 = off; 64 = low; 128 = medium; 192 = high.    
  2031.                                                                               
  2032.                                                                               
  2033.    Examples:                                                                  
  2034.                                                                               
  2035.       PAL PS 1          (Gray scale palette)                                  
  2036.       PAL PS 7          (Built in color palette #7)                           
  2037.       PAL DIS                                                                 
  2038.       PAL EDI                                                                 
  2039.       PAL CYC 2                                                               
  2040.       PAL CYC 4                                                               
  2041.                                                                               
  2042.                                                                               
  2043. 4.5.23 PERSPECTIVE                                                            
  2044.                                                                               
  2045.    PERSPECTIVE displays the current image as a pseudo-perspective plot.       
  2046. This is useful for inspecting the topography of an image - brighter areas     
  2047. will seem to be raised higher than dark areas.                                
  2048.                                                                               
  2049.    The PERSPECTIVE command has these arguments:                               
  2050.                                                                               
  2051.    SL  n   displays the plot starting at line n of the image                  
  2052.                                                                               
  2053.    SCR     reads the image from the screen, rather than from disk (slightly   
  2054.            faster).                                                           
  2055.                                                                               
  2056.                                                                               
  2057. 4.5.24 PROFILE                                                                
  2058.                                                                               
  2059.                                                                               
  2060.    PROFILE plots the DN values of pixels located along a line between two     
  2061. points in the image, i.e., it creates a graph of DN value versus pixel        
  2062. along the line joining the two points, CURsor mode is used to select the      
  2063. two endpoints; typing "." or carriage return, or tapping the left mouse       
  2064. button, selects the current cursor position as the endpoint.  After the       
  2065. endpoints are selected a line is drawn between the points and the graph is    
  2066. plotted at the bottom of the screen, showing the DN values on the x-axis      
  2067. and the positions along the line on the y-axis.                               
  2068.                                                                               
  2069.                                                                               
  2070. 4.5.25 QUIT                                                                   
  2071.                                                                               
  2072.                                                                               
  2073.    The QUIT command exits IMDISP and returns the user to the MS-DOS           
  2074. operating system.  The contents of the image display and refresh buffer are   
  2075. discarded.  The single subcommand NOClear will leave the computer display     
  2076. in graphics mode, and will not clear the screen.                              
  2077.                                                                               
  2078.                                                                               
  2079. 4.5.26 REFRESH                                                                
  2080.                                                                               
  2081.                                                                               
  2082.    REFRESH redisplays the image plane from the refresh buffer.  When images   
  2083. are written to the screen they are also written to the refresh buffer.  The   
  2084. REFRESH command writes this buffer back to the screen, thereby erasing any    
  2085. graphics or text overlaying the image on the screen.  The refresh buffer      
  2086. contains as many lines from the display screen as there is room for in        
  2087. memory.  REFRESH takes no parameters.  It can also be used after the FILE     
  2088. prompt mode to redisplay the contents of the refresh buffer.  By default,     
  2089. the refresh buffer is allocated from extended (XMS) memory.  If extended      
  2090. memory is present, the refresh buffer is on by default.  If there isn't any   
  2091. extended memory, or not enough extended memory is available, the refresh      
  2092. buffer is off by default, by may be turned on to use a virtual file.  The     
  2093. location of the virtual file is given by the environment variable             
  2094. IMREFRESH.                                                                    
  2095.                                                                               
  2096.    REFRESH is commonly used after the HELP command, or after a HISTOGRAM or   
  2097. PROFILE command to remove text and plots from the display screen.             
  2098.                                                                               
  2099.    The refresh buffer can be disabled/enabled with the SET command:           
  2100.                                                                               
  2101.       SET REFRESH ON                                                          
  2102.       SET REFRESH OFF                                                         
  2103.                                                                               
  2104.                                                                               
  2105. 4.5.27 ROTATE                                                                 
  2106.                                                                               
  2107.                                                                               
  2108.    The ROTATE command rotates the image through a specified angle.  The       
  2109. entire image or just the displayed portion can be rotated.  The resulting     
  2110. image can be clipped to the dimensions of the screen, if desired, and the     
  2111. borders of the image filled.                                                  
  2112.                                                                               
  2113.    ROTATE takes the following arguments and keywords:                         
  2114.                                                                               
  2115.    n          the angle to rotate the image through.  Must be between 0 and   
  2116.               360 degrees.                                                    
  2117.                                                                               
  2118.    SCREEN     rotate the entire screen                                        
  2119.                                                                               
  2120.    CLIP       trim off the parts of the rotated image outside the display     
  2121.                                                                               
  2122.    NOFILL     don't blank out the borders of the image                        
  2123.                                                                               
  2124.                                                                               
  2125. 4.5.28 SAVE                                                                   
  2126.                                                                               
  2127.                                                                               
  2128.    The SAVE command copies the contents of the display screen to a file.      
  2129. On EGA systems the display buffer contains only 4-bits per pixel, so          
  2130. specifying BP = 8 will write the 4-bit pixels in full bytes, but does not     
  2131. save full 8-bit pixels even if the input image is an 8-bit image.  Use the    
  2132. COPIM utility program to produce a full resolution subset of an 8-bit image   
  2133. in that case.  An 8-bit display device can save an image with full 8-bit      
  2134. pixels.                                                                       
  2135.                                                                               
  2136.    SAVE takes the following arguments and keywords, where the filename must   
  2137. immediately follow the SAVE command:                                          
  2138.                                                                               
  2139.     filename    filename of image to save - if the extension on the           
  2140.                 filename is .GIF, the file will be saved in GIF format        
  2141.                 instead of PDS format.                                        
  2142.                                                                               
  2143.     FORMAT xxx  saves the file in the specified format, where "xxx" is GIF,   
  2144.                 RAW or PDS.                                                   
  2145.                                                                               
  2146.     NL n                                                                      
  2147.     NS n        number of lines and samples to save                           
  2148.                                                                               
  2149.     SL n                                                                      
  2150.     SS n        starting line and sample to save                              
  2151.     BP n        number of bits per pixel in output image                      
  2152.     REFRESH     save the displayed image into the refresh buffer              
  2153.                                                                               
  2154.    Example: Save a 200 line by 200 sample area from the inner region of an    
  2155. image in the file SMALL.IMG.  First use the FILE command to select and        
  2156. display an input image.  Now type:                                            
  2157.                                                                               
  2158.    "SAVE SMALL.IMG SL 100 SS 210 NL 200 NS 200"                               
  2159.                                                                               
  2160. to save the portion of the image beginning at line 100 and sample 210 in      
  2161. the new file SMALL.IMG.                                                       
  2162.                                                                               
  2163.                                                                               
  2164. 4.5.29 SET                                                                    
  2165.                                                                               
  2166.                                                                               
  2167.    SET is used set various display options.  It may be used to display and    
  2168. change the DN (pixel value) range that is used to compress the pixel values   
  2169. to the range appropriate for the display device.  The default, which is       
  2170. reset for each new file, is the full range of DN values for the particular    
  2171. pixel format (e.g.,  0 to 255 for byte).                                      
  2172.                                                                               
  2173.    The results of a SET DNLOW or SET DNHIGH command will not take effect      
  2174. until the next DISPLAY command is performed.                                  
  2175.                                                                               
  2176.    SET can also be used to specify a file name to be used by the browse       
  2177. command, change the default display resolution or change the number of        
  2178. samples used to display the current image.                                    
  2179.                                                                               
  2180.    Set takes the following keywords:                                          
  2181.                                                                               
  2182.     DNLOW n                                                                   
  2183.     DNHIGH n  where values less than DNLOW are set to color value 0, values   
  2184.               greater than DNHIGH are set to the maximum color value          
  2185.               available, and the color values between are assigned equally    
  2186.               to the DN values between DNLOW and DNHIGH.  You can also use    
  2187.               LOW and HIGH instead of DNLOW and DNHIGH.                       
  2188.                                                                               
  2189.     BROwse filename                                                           
  2190.               sets a file name to be used for the browse file.  This file     
  2191.               name will override the default file name, which is              
  2192.               'c:browse.cmd'.                                                 
  2193.                                                                               
  2194.     NS n      sets the number of samples to be used for the next DISPLAY      
  2195.               command.                                                        
  2196.                                                                               
  2197.     REFresh ON                                                                
  2198.     REFresh OFF                                                               
  2199.               toggles the state of the refresh buffer on or off.  If IMDISP   
  2200.               detects the presence of extended memory (XMS - managed by a     
  2201.               device driver like HIMEM.SYS or QEMM), the refresh buffer       
  2202.               will default to ON.  If no XMS is present, the default is       
  2203.               off, and turning the refresh buffer on will cause IMDISP to     
  2204.               set up a scratch file to be used as the refresh buffer.         
  2205.                                                                               
  2206.     DELay ON                                                                  
  2207.     DELay OFF (default)                                                       
  2208.               enables/disables the time delay before executing commands.      
  2209.               Most useful when used in batch file, because it allows the      
  2210.               commands to play slowly instead of as fast as possible.         
  2211.                                                                               
  2212.     PROmpt ON  (default)                                                      
  2213.     PROmpt OFF                                                                
  2214.               enables/disables the display of the command names before        
  2215.               execution.  Most useful when used in batch files, because it    
  2216.               prevents the command prompts from appearing on the screen.      
  2217.                                                                               
  2218.     DISPLAY name                                                              
  2219.               sets the current display device.  You might use this to         
  2220.               change from Super VGA resolution to VGA if you wish to have     
  2221.               bigger pixels for displaying images with the BROWSE command,    
  2222.               for example.  To do this, you would type the command SET DIS    
  2223.               VGA.  The change will take place immediately.  The current      
  2224.               values for DISPLAY are                                          
  2225.                                                                               
  2226.               CGA         (640x200x2)                                         
  2227.               EGA         (640x350x16)                                        
  2228.               EGA480      (640x480x16)                                        
  2229.               VGA320      (320x200x256)                                       
  2230.               VGA         (640x480x16)                                        
  2231.               ATI640      (640x480x256) - ATI VGA Wonder Board (512K)         
  2232.               ATI800      (800x600x256) - ATI VGA Wonder Board (512K)         
  2233.               ATI1024     (1024x768x16) - ATI VGA Wonder Board (512K)         
  2234.               EVGA512     (512x480x256) - Everex EV-673 Board (256K)          
  2235.               EVGA640     (640x400x256) - Everex EV-673 Board (256K)          
  2236.               ORCHID      (640x480x256) - Orchid ProDesigner+ Board (512K)    
  2237.               ORCHID800   (800x600x256) - Orchid ProDesigner+ Board (512K)    
  2238.               ORCHID1024 (1024x768x256) - Orchid ProDesigner+ Board (1MB)     
  2239.               PARADISE    (640x480x256) - Paradise SuperVGA Board (512K)      
  2240.                           (640x400x256) - Paradise SuperVGA Board (256K)      
  2241.               PGA         (640x480x256) - PGA Board                           
  2242.               TRIDENT     (640x480x256) - Trident-based SVGA boards (512K)    
  2243.               VESA       (1024x768x256) - VESA SVGA Interface (1MB)           
  2244.                                                                               
  2245.     PALette directory                                                         
  2246.               Sets the default palette directory.  This is used with the      
  2247.               PAL LOAD command.  If PAL LOAD is used with no parameters,      
  2248.               IMDISP will go to the default palette directory and display     
  2249.               the files there.                                                
  2250.                                                                               
  2251.     BUFfers directory                                                         
  2252.               Sets the directory to hold the buffers as files instead of      
  2253.               memory buffers.  Useful when not enough extended (XMS) memory   
  2254.               exists to create the buffers.                                   
  2255.                                                                               
  2256.    For example, using the default color palette and an EGA display with 16    
  2257. color values available, the command "SET DNLO 100 DNHI 164" will assign DN    
  2258. values below 100 to black and DN values above 164 to white, and spread the    
  2259. 16 color values between the DN limits, thus each color value will represent   
  2260. 4 DNs (value 0 = DN 100 to 103; value 1 - DN 104 to 107, etc.).               
  2261.                                                                               
  2262.    If values other than the default are used then the images will display     
  2263. more slowly because scaling divisions are required.  SET with no parameters   
  2264. will display the current values.                                              
  2265.                                                                               
  2266.    The DNLO and DNHI values are reset to the minimum and maximum for a        
  2267. given pixel size when a FILE command is issued.                               
  2268.                                                                               
  2269.                                                                               
  2270. 4.5.30 SLANT                                                                  
  2271.                                                                               
  2272.                                                                               
  2273.    SLANT displays the image slanted either to the left or right.  This is     
  2274. done by shifting each line of the image by 1 pixel.  It is particularly       
  2275. useful for finding errors in image headers.                                   
  2276.                                                                               
  2277.                                                                               
  2278.    Examples:                                                                  
  2279.                                                                               
  2280.       SLANT                (slants image to the right)                        
  2281.       SLANT LEFT                                                              
  2282.                                                                               
  2283.                                                                               
  2284. 4.5.31 STRETCH                                                                
  2285.                                                                               
  2286.                                                                               
  2287.    STRETCH sets the palette to a gray scale stretched between the two         
  2288. specified pixel values.  Stretch is most useful on the PGA, VGA and           
  2289. SuperVGA displays where 16 or more gray levels are available.  On the EGA     
  2290. display the stretch command activates the gray level palette which provides   
  2291. only 4 gray levels.  Use the PAL PS 0 command to return the display to the    
  2292. default palette after performing a stretch.  Note that STRETCH only affects   
  2293. the color look-up tables in the display hardware, rather than modifying the   
  2294. pixel values as it reads the data, so it is very fast.                        
  2295.                                                                               
  2296.    STRETCH takes the following keywords :                                     
  2297.                                                                               
  2298.     LOW n                                                                     
  2299.     HIGh n   the low and high DN values of the stretch.                       
  2300.                                                                               
  2301.                                                                               
  2302.    These pixel values refer to the DN values in the current image display,    
  2303. not necessarily in the original image (scaling may have been involved).       
  2304. For example with the EGA display the DN values in the display range from 0    
  2305. to 15, even if a byte image is being displayed.                               
  2306.                                                                               
  2307.    The STRETCH command is not recommended for use on EGA systems.             
  2308.                                                                               
  2309.                                                                               
  2310. 4.5.32 SYSTEM                                                                 
  2311.                                                                               
  2312.                                                                               
  2313.    The SYSTEM command is used to send a command to MS-DOS.                    
  2314.                                                                               
  2315.    For example "SYS L:" will set the L: drive as the current default drive.   
  2316. If there is not enough memory available for the system command to be          
  2317. executed an error message is displayed.  The SYS command will not work on     
  2318. floppy disk systems unless the file "COMMAND.COM" is present on the floppy    
  2319. disk with the IMDISP program.                                                 
  2320.                                                                               
  2321.    The SYSTEM command in this version of IMDISP will attempt to free as       
  2322. much of memory as possible, by swapping most of the program to scratch        
  2323. space.  It tries to find Extended memory (XMS), Expanded memory (EMS) or      
  2324. disk space, in that order.  If it succeeds, only a small amount of IMDISP     
  2325. remains in memory, leaving far more memory for DOS functions that previous    
  2326. versions.  If the attempt to swap fails, the program will try to swap to      
  2327. DOS with the available memory.  Currently, you must have about the same       
  2328. amount of free XMS, EMS or disk space as you have memory free before          
  2329. running IMDISP (i.e., IMDISP allocates all available memory to itself when    
  2330. it starts, and requires that much scratch space when swapping out).           
  2331.                                                                               
  2332.    The swap process, if it attempts to write out to a scratch disk file,      
  2333. will use the directory specified by the environment variable IMBROWSE.  If    
  2334. IMBROWSE doesn't exist, IMDISP will write the scratch file to the root        
  2335. directory of drive C:.  The scratch file is deleted when you return to        
  2336. IMDISP (using the EXIT command at the DOS prompt).                            
  2337.                                                                               
  2338.                                                                               
  2339. 4.5.33 TEXT                                                                   
  2340.                                                                               
  2341.                                                                               
  2342.    The text command can be used to display a string of text on the screen.    
  2343. The text string can be entered on the command line, enclosed in apostrophes   
  2344. or quotes (e.g., TEXT `This is a text string').  If the text string is not    
  2345. entered on the command line the program will prompt for the string to be      
  2346. displayed.                                                                    
  2347.                                                                               
  2348.    Once the command is issued and the text string entered the program is      
  2349. placed in CURSOR mode so that the display position can be selected.  This     
  2350. is done by using the arrow keys to move the cursor to the desired location.   
  2351. After the position is selected, the user types a period (.) or carriage       
  2352. return and the text will be written on the display screen.                    
  2353.                                                                               
  2354.    The TEXT command has one argument and two optional keywords.               
  2355.                                                                               
  2356.    LINe      The line number to position the text at.                         
  2357.    SAMple    The sample number to position the text at.                       
  2358.    NOPrompt  Will display text without the command line prompt.               
  2359.                                                                               
  2360.    'text...' The text string to be printed, enclosed in quotes or             
  2361.              apostrophes.                                                     
  2362.                                                                               
  2363.    The text command writes over image data in the display and refresh         
  2364. buffer, thus the underlying portion of the image is lost.                     
  2365.                                                                               
  2366.                                                                               
  2367. 4.5.34 TYPE                                                                   
  2368.                                                                               
  2369.                                                                               
  2370.    The TYPE command is used to type the contents of a text file on the        
  2371. display screen, using the standard MS-DOS type command.                       
  2372.                                                                               
  2373.    Its argument is passed to MS-DOS for execution.  At the end of the type    
  2374. operation the screen will display "Type carriage return to continue:" which   
  2375. will return to the IMDISP command mode.  If there is not enough memory        
  2376. available for the system command to be executed an error message is           
  2377. displayed.                                                                    
  2378.                                                                               
  2379.                                                                               
  2380. 4.5.35 NEG                                                                    
  2381.                                                                               
  2382.                                                                               
  2383.    The NEG command is used to invert the current color palette, turning the   
  2384. image into a negative.  It takes no keywords or arguments.                    
  2385.                                                                               
  2386.                                                                               
  2387. 4.5.36 PLOT                                                                   
  2388.                                                                               
  2389.    The PLOT command is used to draw plots of image lines and spectra on the   
  2390. screen.  If the current file is an image, you must specify which line you     
  2391. wish to plot.                                                                 
  2392.                                                                               
  2393.    PLOT takes the following keywords:                                         
  2394.                                                                               
  2395.     LIN n      plot line n of the image (required for 2-D files)              
  2396.                                                                               
  2397.     SYMbol x   draw the plot using character x instead of connecting the      
  2398.                points with a line                                             
  2399.                                                                               
  2400.     ZOOm       prompt user to zoom in on a region of the plot after it is     
  2401.                drawn                                                          
  2402.                                                                               
  2403.     OVErlay    overplot - do not erase the current plot                       
  2404.                                                                               
  2405.     MAX n      set the maximum y value in the plot                            
  2406.                                                                               
  2407.     MIN n      set the minimum y value in the plot                            
  2408.                                                                               
  2409.     COLor n    use DN value n to plot the data                                
  2410.                                                                               
  2411.     SPEctrum   analyze the plotted spectrum by doing baseline removal and     
  2412.                integrating line flux.                                         
  2413.                                                                               
  2414.   Example:  to compare lines 200 and 210 of the current image on the same     
  2415. vertical scale, first plot line 200 (as a line) with the command              
  2416.                                                                               
  2417.     PLOT LINE 200 MIN 0 MAX 255                                               
  2418.                                                                               
  2419.    Now overlay the plot of line 210 using "+" signs and color 10 of the       
  2420. current palette with the command                                              
  2421.                                                                               
  2422.     PLOT LINE 210 OVERLAY MIN 0 MAX 255 COLOR 10 SYMBOL +                     
  2423.                                                                               
  2424.                                                                               
  2425. 4.5.37  WINDOW                                                                
  2426.                                                                               
  2427.                                                                               
  2428.    The WINDOW command lets the user define a subimage with the cursor keys    
  2429. or a mouse.  The mouse button (or enter key) sets the starting point and      
  2430. then the lower corner is "dragged" to the desired position.  The window       
  2431. stays in effect until turned off with the CANCEL subcommand.                  
  2432.                                                                               
  2433.    WINDOW takes the following subcommands:                                    
  2434.                                                                               
  2435.     CANCEL      cancels the defined window and sets commands back to the      
  2436.                 full screen                                                   
  2437.                                                                               
  2438.     S1 n                                                                      
  2439.     S2 n        defines the starting and ending samples of the window         
  2440.                                                                               
  2441.     L1 n                                                                      
  2442.     L2 n        defines the starting and ending lines of the window           
  2443.                                                                               
  2444.                                                                               
  2445. 4.6 OTHER UTILITY PROGRAMS                                                    
  2446.                                                                               
  2447.                                                                               
  2448.    There are several utility programs also provided on the distribution       
  2449. disk.  These programs can read PDS labeled, VICAR2 labeled, or unlabeled      
  2450. images.  The output images are always written with PDS ODL labels.  The       
  2451. programs prompt for the necessary input values.                               
  2452.                                                                               
  2453.                                                                               
  2454. 4.6.1 COPIM                                                                   
  2455.                                                                               
  2456.                                                                               
  2457.    COPIM is a simple image copying program.  It can copy the whole image,     
  2458. for example to put PDS labels on a foreign image), or extract a window from   
  2459. the image.  It can subsample the image with an integral subsampling factor.   
  2460. The program prompts for the input and output file names, the window to        
  2461. extract (just type return for the whole image), and the subsampling factor    
  2462. (the default is 1).  If the input file is not in VICAR2 or PDS image format   
  2463. the program will also prompt for the number of lines and samples, pixel       
  2464. size and header size of the image.                                            
  2465.                                                                               
  2466.    For example, to extract the first 100 lines and samples from the file      
  2467. LOGO.IMG the following commands would be used:                                
  2468.                                                                               
  2469.    COPIM                                                                      
  2470.    Input Image: LOGO.IMG                                                      
  2471.    Lines: 350 Samples: 340 Bits per pixel: 1                                  
  2472.    Output Image: LOGOSUB.IMG                                                  
  2473.    Starting line and sample, number of lines and samples:                     
  2474.    1 1 100 100                                                                
  2475.    Line Subsampling factor (1): 1                                             
  2476.    Sample Subsampling factor(1): 1                                            
  2477.                                                                               
  2478.                                                                               
  2479. 4.6.2 CONVERT                                                                 
  2480.                                                                               
  2481.                                                                               
  2482.    CONVERT is simple pixel format conversion program.  It converts an image   
  2483. to an integer (16 bits), byte (8 bits), nibble (4 bits), or binary (1 bit)    
  2484. image.  It can also perform a user specified scaling.  The program prompts    
  2485. for the input and output file names, the output format (must be 1,4,8, or     
  2486. 16 bits), and the input and output numerical ranges for scaling.  The         
  2487. default scaling values are appropriate for the data types being used.         
  2488.                                                                               
  2489.    For example, to convert MONTAGE.IMG to an 8-bit per pixel image and        
  2490. scale the output pixels evenly between the values of 0 and 127 the            
  2491. following commands would be used:                                             
  2492.                                                                               
  2493.    CONVERT                                                                    
  2494.    Input Image: MONTAGE.IMG                                                   
  2495.    Lines : 350    Samples : 640 Bits per pixel : 4                            
  2496.    Output Image: MONTBIG.IMG                                                  
  2497.    Output bits per pixel (1, 4, 8, 16) : 8                                    
  2498.    Input DN range (O 15) :                                                    
  2499.    Output DN range (O 255) : 0 127                                            
  2500.                                                                               
  2501.                                                                               
  2502.                                  Chapter 5                                    
  2503.                                                                               
  2504.                                   CREDITS                                     
  2505.                                                                               
  2506.    IMDISP is maintained and updated (since version 4.4) by a small group of   
  2507. volunteers -- Mike Martin, Ron Baalke (JPL) and Archie Warnock (Hughes STX    
  2508. Corp).  It was originally written by Mike Martin, Frank Evans and Dan         
  2509. Nakamura of the Jet Propulsion Lab.  The plotting code was originally         
  2510. written by Ed Esfandari (Interferometrics).  Paradise and Trident video       
  2511. drivers were added by Gregg Gunnells of the USGS.  Jerry McFaul (USGS), Ed    
  2512. Grayzeck (U of MD) and Nick Beser (JHU/APL) have been valiant testers of      
  2513. the program through its many iterations, and have made many suggestions for   
  2514. improvements along the way.                                                   
  2515.                                                                               
  2516.    IMDISP would not have its current capabilities if it weren't for the       
  2517. generous efforts of several software authors who have seen fit to donate      
  2518. their work into the public domain.  Through their work, we are able to keep   
  2519. IMDISP in the public domain, free to anyone who wants it.  We want to         
  2520. publicly thank all of them here:                                              
  2521.                                                                               
  2522. Gershon Elber     - GIF I/O routines (GIF_LIB.ZIP)                            
  2523. Michael Walraven  - High resolution timer (TIMERHI.ZIP)                       
  2524. Max Medley        - Mouse interface code                                      
  2525. James Birdsall    - EMS, XMS allocation code (EMSLB215.ZIP, XMSLB121.ZIP)     
  2526. Marty Del Vecchio - EMS/XMS swap routines (SWAP300.ZIP)                       
  2527.                                                                               
  2528.    And, of course, we would also like to thank our users, from whom we        
  2529. continue to receive ideas, bug reports and fixes.  They exercise the          
  2530. program in ways we never imagined.                                            
  2531.                                                                               
  2532. GIF and 'Graphics Interchange Format' are trademarks of CompuServe,           
  2533. Incorporated, an H&R Block Company.                                           
  2534.                                                                               
  2535.                                                                               
  2536.                                   Appendix                                    
  2537.                                                                               
  2538.                               COMMAND SUMMARY                                 
  2539.                                                                               
  2540.                                                                               
  2541.    Within this command summary listing, brackets ([]) indicate optional       
  2542. parameters or keywords.  Filename is the name of a file in the current        
  2543. directory or a fully qualified filename which can include drive letter and    
  2544. pathname.  Directory name is an MS-DOS directory path specification, a        
  2545. valid directory mask a specification containing wild card characters (*, ?)   
  2546. per MS-DOS rules for wildcard use in the DIRECTORY command.  The symbol "n"   
  2547. is used to indicate an integer value.                                         
  2548.                                                                               
  2549.   BATCH        [filename]                                                     
  2550.   BRIGHTEN     [n]                                                            
  2551.   BROWSE       [directory mask] [SIZe n] [SUB n] [NOLabel]  [DNLOw n]         
  2552.                [DNHIgh n] [PAUse n] [ALL] [SELect] [FILe] [BUFFERS]           
  2553.                [AUToset n]                                                    
  2554.   CD           [directory name] [..]                                          
  2555.   CHDIR        [directory name] [..]                                          
  2556.   COPY         [buffer [TO buffer]] [FILE]                                    
  2557.   CURSOR       [DSL n] [DSS n]                                                
  2558.   DARKEN       [n]                                                            
  2559.   DIRECTORY    [directory mask] [/w]                                          
  2560.   DISPLAY      [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENTer] [DSL n]    
  2561.                [DSS n] [ZOOm] [FLIP] [NOPrompt] [NOMemory] [AUToset]          
  2562.                [SOUrce] [CURsor] [buffer]                                     
  2563.   ENHANCE      [BAAlke] [CONvolution n] [EDGe n] [HIGh n] [HIStogram]         
  2564.                [LOG n] [MEAn n] [MEDian] [POWer n] [STAir n] [SMEar]          
  2565.                [SCReen] [UNSharp]                                             
  2566.   ERASE        [REFresh] [buffer]                                             
  2567.   EXIT         [NOClear]                                                      
  2568.   FILE         [filename[.GIF]] ["CD:mm:ss:bb"] [NOMemory]                    
  2569.   HELP         [command name]                                                 
  2570.   HISTOGRAM    [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n] [CENter]            
  2571.                [VOYager] [VIKing] [buffer]                                    
  2572.   LABEL                                                                       
  2573.   LOG          [ON] [FILe filename] [CLOse] [OFF]                             
  2574.   MASK         [LO n [WITH n]] [HI n [WITH n]]                                
  2575.   MENU         [filename]                                                     
  2576.   MERGE        [buffer [scale] [WITH buffer [scale] [TO buffer]]] [FILE]      
  2577.   NEG                                                                         
  2578.   OVERLAY      [MAXLAT n] [MAXLON n] [MINLAT n] [MINLON n] [LEGend]           
  2579.   PALETTE      [EDIT n] [PS n] [LOAd filename] [SAVe filename] [DISplay]      
  2580.                [ERAse] [CYC n [FAST] [TIME n]]                                
  2581.   PERSPECTIVE  [SL n] [SCR]                                                   
  2582.   PLOT         [LINe n] [SYMbol x] [COLor n] [MAX n] [MIN n] [OVErlay]        
  2583.                [ZOOm] [SPECtrum]                                              
  2584.   PROFILE                                                                     
  2585.   QUIT         [NOClear]                                                      
  2586.   REFRESH                                                                     
  2587.   ROTATE       [n] [SCReen] [NOFill] [CLIp]                                   
  2588.   SAVE         filename[.GIF] [FORmat fmt] [SL n] [SS n] [NL n] [NS n] [BP n] 
  2589.                [REFRESH]                                                      
  2590.   SET          [DNLO n] [DNHI n] [BROwse filename] [DIS name] [NS n]          
  2591.                [PAL dir] [REFresh ON/OFF] [DELay ON/OFF] [PROmpt ON/OFF]      
  2592.                [BUFFERS dir]                                                  
  2593.   SLANT        [RIGht] [LEFt]                                                 
  2594.   STRETCH      [LO n] [HI n]                                                  
  2595.   SYSTEM       [MS-DOS command]                                               
  2596.   TEXT         [LINe n] [SAMple n] "text" or 'text' [NOPrompt]                
  2597.   TYPE         filename                                                       
  2598.   WINDOW       [CANcel] [S1 n] [L1 n] [S2 n] [L2 n]                           
  2599.                                                                               
  2600.                                                                               
  2601.                     MS-DOS ENVIRONMENT VARIABLE SUMMARY                       
  2602.                                                                               
  2603.     All of these environment variables control options for IMDISP.            
  2604.                                                                               
  2605. SET IMDISP=<display-type>                                                     
  2606. SET IMBROWSE=<subdirectory>                                                   
  2607. SET IMPALETTE=<subdirectory>                                                  
  2608. SET IMREFRESH=<subdirectory>                                                  
  2609. SET IMHELP=<subdirectory and/or filename>                                     
  2610.